Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mobile/android/base/BrowserApp.java

Issue 6222010732511232: Noissue - Prefix our IDs/strings with abb_ and group them (Closed)
Patch Set: Created May 8, 2015, 4:14 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | mobile/android/base/locales/en-US/android_strings.dtd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public 2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko; 6 package org.mozilla.gecko;
7 7
8 import java.io.File; 8 import java.io.File;
9 import java.io.FileNotFoundException; 9 import java.io.FileNotFoundException;
10 import java.lang.Override; 10 import java.lang.Override;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 Log.d(LOGTAG, "BrowserApp.onTabChanged: " + tab.getId() + ": " + msg); 282 Log.d(LOGTAG, "BrowserApp.onTabChanged: " + tab.getId() + ": " + msg);
283 switch(msg) { 283 switch(msg) {
284 case LOCATION_CHANGE: 284 case LOCATION_CHANGE:
285 // fall through 285 // fall through
286 case SELECTED: 286 case SELECTED:
287 if (Tabs.getInstance().isSelectedTab(tab)) { 287 if (Tabs.getInstance().isSelectedTab(tab)) {
288 updateHomePagerForTab(tab); 288 updateHomePagerForTab(tab);
289 if (mMenu != null) 289 if (mMenu != null)
290 org.adblockplus.browser.BrowserAppUtils.updateBlockAdsMe nuItem( 290 org.adblockplus.browser.BrowserAppUtils.updateBlockAdsMe nuItem(
291 mMenu.findItem(R.id.block_ads)); 291 mMenu.findItem(R.id.abb_block_ads));
292 } 292 }
293 293
294 mHideDynamicToolbarOnActionModeEnd = false; 294 mHideDynamicToolbarOnActionModeEnd = false;
295 break; 295 break;
296 case START: 296 case START:
297 if (Tabs.getInstance().isSelectedTab(tab)) { 297 if (Tabs.getInstance().isSelectedTab(tab)) {
298 invalidateOptionsMenu(); 298 invalidateOptionsMenu();
299 299
300 if (mDynamicToolbar.isEnabled()) { 300 if (mDynamicToolbar.isEnabled()) {
301 mDynamicToolbar.setVisible(true, VisibilityTransition.AN IMATE); 301 mDynamicToolbar.setVisible(true, VisibilityTransition.AN IMATE);
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 } 2582 }
2583 2583
2584 // Action providers are available only ICS+. 2584 // Action providers are available only ICS+.
2585 if (Versions.feature14Plus) { 2585 if (Versions.feature14Plus) {
2586 GeckoMenuItem share = (GeckoMenuItem) mMenu.findItem(R.id.share); 2586 GeckoMenuItem share = (GeckoMenuItem) mMenu.findItem(R.id.share);
2587 GeckoActionProvider provider = GeckoActionProvider.getForType(GeckoA ctionProvider.DEFAULT_MIME_TYPE, this); 2587 GeckoActionProvider provider = GeckoActionProvider.getForType(GeckoA ctionProvider.DEFAULT_MIME_TYPE, this);
2588 share.setActionProvider(provider); 2588 share.setActionProvider(provider);
2589 } 2589 }
2590 2590
2591 org.adblockplus.browser.BrowserAppUtils.updateBlockAdsMenuItem( 2591 org.adblockplus.browser.BrowserAppUtils.updateBlockAdsMenuItem(
2592 mMenu.findItem(R.id.block_ads)); 2592 mMenu.findItem(R.id.abb_block_ads));
2593 2593
2594 return true; 2594 return true;
2595 } 2595 }
2596 2596
2597 @Override 2597 @Override
2598 public void openOptionsMenu() { 2598 public void openOptionsMenu() {
2599 // Disable menu access (for hardware buttons) when the software menu but ton is inaccessible. 2599 // Disable menu access (for hardware buttons) when the software menu but ton is inaccessible.
2600 // Note that the software button is always accessible on new tablet. 2600 // Note that the software button is always accessible on new tablet.
2601 if (mBrowserToolbar.isEditing() && !NewTabletUI.isEnabled(this)) { 2601 if (mBrowserToolbar.isEditing() && !NewTabletUI.isEnabled(this)) {
2602 return; 2602 return;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 try { 2948 try {
2949 args.put("desktopMode", !item.isChecked()); 2949 args.put("desktopMode", !item.isChecked());
2950 args.put("tabId", selectedTab.getId()); 2950 args.put("tabId", selectedTab.getId());
2951 } catch (JSONException e) { 2951 } catch (JSONException e) {
2952 Log.e(LOGTAG, "error building json arguments", e); 2952 Log.e(LOGTAG, "error building json arguments", e);
2953 } 2953 }
2954 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Desk topMode:Change", args.toString())); 2954 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Desk topMode:Change", args.toString()));
2955 return true; 2955 return true;
2956 } 2956 }
2957 2957
2958 if (itemId == R.id.block_ads) { 2958 if (itemId == R.id.abb_block_ads) {
2959 org.adblockplus.browser.BrowserAppUtils.updateCurrentTabWhitelisting (item); 2959 org.adblockplus.browser.BrowserAppUtils.updateCurrentTabWhitelisting (item);
2960 return true; 2960 return true;
2961 } 2961 }
2962 2962
2963 if (itemId == R.id.new_tab) { 2963 if (itemId == R.id.new_tab) {
2964 addTab(); 2964 addTab();
2965 return true; 2965 return true;
2966 } 2966 }
2967 2967
2968 if (itemId == R.id.new_private_tab) { 2968 if (itemId == R.id.new_private_tab) {
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
3333 dispatcher, 3333 dispatcher,
3334 osLocale, 3334 osLocale,
3335 appLocale, 3335 appLocale,
3336 previousSession); 3336 previousSession);
3337 } 3337 }
3338 3338
3339 public static interface Refreshable { 3339 public static interface Refreshable {
3340 public void refresh(); 3340 public void refresh();
3341 } 3341 }
3342 } 3342 }
OLDNEW
« no previous file with comments | « no previous file | mobile/android/base/locales/en-US/android_strings.dtd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld