Bug 806927: [PBM] Add private browsing specific menu items to the main menu. [r=mfinkle]
☠☠ backed out by a58070f72659 ☠ ☠
authorSriram Ramasubramanian <sriram@mozilla.com>
Wed, 28 Nov 2012 11:23:54 -0800
changeset 114389 11fcd37bfb7d54c103b4b002d100437c8396561f
parent 114388 e63a025943ebaf16524f4b771f714a27b111afc8
child 114390 cdf30a34dec9e075b180b9be94defd5421690409
push id23917
push useremorley@mozilla.com
push dateThu, 29 Nov 2012 14:20:29 +0000
treeherdermozilla-central@c72d38e7a212 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs806927
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 806927: [PBM] Add private browsing specific menu items to the main menu. [r=mfinkle]
mobile/android/base/BrowserApp.java
mobile/android/base/Makefile.in
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/resources/drawable-hdpi/ic_menu_save_as_pdf.png
mobile/android/base/resources/drawable-hdpi/ic_menu_share.png
mobile/android/base/resources/drawable-xhdpi/ic_menu_save_as_pdf.png
mobile/android/base/resources/drawable-xhdpi/ic_menu_share.png
mobile/android/base/resources/drawable/ic_menu_save_as_pdf.png
mobile/android/base/resources/drawable/ic_menu_share.png
mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in
mobile/android/base/resources/menu-v11/browser_app_menu.xml.in
mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml.in
mobile/android/base/resources/menu/browser_app_menu.xml.in
mobile/android/base/strings.xml.in
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -980,17 +980,20 @@ abstract public class BrowserApp extends
                 try {
                     args.put("desktopMode", !item.isChecked());
                     args.put("tabId", selectedTab.getId());
                 } catch (JSONException e) {
                     Log.e(LOGTAG, "error building json arguments");
                 }
                 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("DesktopMode:Change", args.toString()));
                 return true;
-            case R.id.private_browsing:
+            case R.id.new_tab:
+                addTab();
+                return true;
+            case R.id.new_private_tab:
                 Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE);
                 return true;
             default:
                 return super.onOptionsItemSelected(item);
         }
     }
 
     /*
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -492,19 +492,19 @@ RES_DRAWABLE_BASE = \
   res/drawable/ic_awesomebar_search.png \
   res/drawable/ic_awesomebar_star.png \
   res/drawable/ic_menu_back.xml \
   res/drawable/ic_menu_bookmark_add.png \
   res/drawable/ic_menu_bookmark_remove.png \
   res/drawable/ic_menu_desktop_mode_off.xml \
   res/drawable/ic_menu_desktop_mode_on.xml \
   res/drawable/ic_menu_forward.png \
+  res/drawable/ic_menu_new_private_tab.png \
+  res/drawable/ic_menu_new_tab.png \
   res/drawable/ic_menu_reload.png \
-  res/drawable/ic_menu_save_as_pdf.png \
-  res/drawable/ic_menu_share.png \
   res/drawable/ic_menu_quit.xml \
   res/drawable/ic_status_logo.png \
   res/drawable/remote_tabs_off.png \
   res/drawable/remote_tabs_on.png \
   res/drawable/tab_new.png \
   res/drawable/tab_close.png \
   res/drawable/tab_thumbnail_default.png \
   res/drawable/tab_thumbnail_shadow.png \
@@ -571,19 +571,19 @@ RES_DRAWABLE_HDPI = \
   res/drawable-hdpi/ic_addons_empty.png \
   res/drawable-hdpi/ic_awesomebar_go.png \
   res/drawable-hdpi/ic_awesomebar_reader.png \
   res/drawable-hdpi/ic_awesomebar_search.png \
   res/drawable-hdpi/ic_awesomebar_star.png \
   res/drawable-hdpi/ic_menu_bookmark_add.png \
   res/drawable-hdpi/ic_menu_bookmark_remove.png \
   res/drawable-hdpi/ic_menu_forward.png \
+  res/drawable-hdpi/ic_menu_new_private_tab.png \
+  res/drawable-hdpi/ic_menu_new_tab.png \
   res/drawable-hdpi/ic_menu_reload.png \
-  res/drawable-hdpi/ic_menu_save_as_pdf.png \
-  res/drawable-hdpi/ic_menu_share.png \
   res/drawable-hdpi/ic_status_logo.png \
   res/drawable-hdpi/remote_tabs_off.png \
   res/drawable-hdpi/remote_tabs_on.png \
   res/drawable-hdpi/tab_new.png \
   res/drawable-hdpi/tab_close.png \
   res/drawable-hdpi/tab_thumbnail_default.png \
   res/drawable-hdpi/tab_thumbnail_shadow.png \
   res/drawable-hdpi/tabs_carat.png \
@@ -638,19 +638,19 @@ RES_DRAWABLE_XHDPI = \
   res/drawable-xhdpi/ic_addons_empty.png \
   res/drawable-xhdpi/ic_awesomebar_go.png \
   res/drawable-xhdpi/ic_awesomebar_reader.png \
   res/drawable-xhdpi/ic_awesomebar_search.png \
   res/drawable-xhdpi/ic_awesomebar_star.png \
   res/drawable-xhdpi/ic_menu_bookmark_add.png \
   res/drawable-xhdpi/ic_menu_bookmark_remove.png \
   res/drawable-xhdpi/ic_menu_forward.png \
+  res/drawable-xhdpi/ic_menu_new_private_tab.png \
+  res/drawable-xhdpi/ic_menu_new_tab.png \
   res/drawable-xhdpi/ic_menu_reload.png \
-  res/drawable-xhdpi/ic_menu_save_as_pdf.png \
-  res/drawable-xhdpi/ic_menu_share.png \
   res/drawable-xhdpi/ic_status_logo.png \
   res/drawable-xhdpi/tab_new.png \
   res/drawable-xhdpi/tab_close.png \
   res/drawable-xhdpi/tab_thumbnail_default.png \
   res/drawable-xhdpi/tab_thumbnail_shadow.png \
   res/drawable-xhdpi/tabs_carat.png \
   res/drawable-xhdpi/doorhanger_arrow.png \
   res/drawable-xhdpi/doorhanger_bg.9.png \
@@ -680,25 +680,29 @@ RES_DRAWABLE_MDPI_V11 = \
   res/drawable-mdpi-v11/alert_addon.png \
   res/drawable-mdpi-v11/alert_app.png \
   res/drawable-mdpi-v11/alert_download.png \
   res/drawable-mdpi-v11/ic_menu_addons.png \
   res/drawable-mdpi-v11/ic_menu_apps.png \
   res/drawable-mdpi-v11/ic_menu_back.png \
   res/drawable-mdpi-v11/ic_menu_bookmark_add.png \
   res/drawable-mdpi-v11/ic_menu_bookmark_remove.png \
+  res/drawable-mdpi-v11/ic_menu_close_all_tabs.png \
   res/drawable-mdpi-v11/ic_menu_desktop_mode_off.png \
   res/drawable-mdpi-v11/ic_menu_desktop_mode_on.png \
   res/drawable-mdpi-v11/ic_menu_downloads.png \
   res/drawable-mdpi-v11/ic_menu_find_in_page.png \
   res/drawable-mdpi-v11/ic_menu_forward.png \
+  res/drawable-mdpi-v11/ic_menu_new_private_tab.png \
+  res/drawable-mdpi-v11/ic_menu_new_tab.png \
   res/drawable-mdpi-v11/ic_menu_reload.png \
   res/drawable-mdpi-v11/ic_menu_save_as_pdf.png \
   res/drawable-mdpi-v11/ic_menu_settings.png \
   res/drawable-mdpi-v11/ic_menu_share.png \
+  res/drawable-mdpi-v11/ic_menu_synced_tabs.png \
   res/drawable-mdpi-v11/ic_menu_tools.png \
   res/drawable-mdpi-v11/ic_menu_quit.png \
   res/drawable-mdpi-v11/ic_status_logo.png \
   res/drawable-mdpi-v11/menu.png \
   res/drawable-mdpi-v11/menu_panel_bg.9.png \
   res/drawable-mdpi-v11/menu_popup_bg.9.png \
   res/drawable-mdpi-v11/menu_popup_arrow.png \
   res/drawable-mdpi-v11/menu_item_check.png \
@@ -710,25 +714,29 @@ RES_DRAWABLE_HDPI_V11 = \
   res/drawable-hdpi-v11/alert_addon.png \
   res/drawable-hdpi-v11/alert_app.png \
   res/drawable-hdpi-v11/alert_download.png \
   res/drawable-hdpi-v11/ic_menu_addons.png \
   res/drawable-hdpi-v11/ic_menu_apps.png \
   res/drawable-hdpi-v11/ic_menu_back.png \
   res/drawable-hdpi-v11/ic_menu_bookmark_add.png \
   res/drawable-hdpi-v11/ic_menu_bookmark_remove.png \
+  res/drawable-hdpi-v11/ic_menu_close_all_tabs.png \
   res/drawable-hdpi-v11/ic_menu_desktop_mode_off.png \
   res/drawable-hdpi-v11/ic_menu_desktop_mode_on.png \
   res/drawable-hdpi-v11/ic_menu_downloads.png \
   res/drawable-hdpi-v11/ic_menu_find_in_page.png \
   res/drawable-hdpi-v11/ic_menu_forward.png \
+  res/drawable-hdpi-v11/ic_menu_new_private_tab.png \
+  res/drawable-hdpi-v11/ic_menu_new_tab.png \
   res/drawable-hdpi-v11/ic_menu_reload.png \
   res/drawable-hdpi-v11/ic_menu_save_as_pdf.png \
   res/drawable-hdpi-v11/ic_menu_settings.png \
   res/drawable-hdpi-v11/ic_menu_share.png \
+  res/drawable-hdpi-v11/ic_menu_synced_tabs.png \
   res/drawable-hdpi-v11/ic_menu_tools.png \
   res/drawable-hdpi-v11/ic_menu_quit.png \
   res/drawable-hdpi-v11/ic_status_logo.png \
   res/drawable-hdpi-v11/menu.png \
   res/drawable-hdpi-v11/menu_panel_bg.9.png \
   res/drawable-hdpi-v11/menu_popup_bg.9.png \
   res/drawable-hdpi-v11/menu_popup_arrow.png \
   res/drawable-hdpi-v11/menu_item_check.png \
@@ -740,25 +748,29 @@ RES_DRAWABLE_XHDPI_V11 = \
   res/drawable-xhdpi-v11/alert_addon.png \
   res/drawable-xhdpi-v11/alert_app.png \
   res/drawable-xhdpi-v11/alert_download.png \
   res/drawable-xhdpi-v11/ic_menu_addons.png \
   res/drawable-xhdpi-v11/ic_menu_apps.png \
   res/drawable-xhdpi-v11/ic_menu_back.png \
   res/drawable-xhdpi-v11/ic_menu_bookmark_add.png \
   res/drawable-xhdpi-v11/ic_menu_bookmark_remove.png \
+  res/drawable-xhdpi-v11/ic_menu_close_all_tabs.png \
   res/drawable-xhdpi-v11/ic_menu_desktop_mode_off.png \
   res/drawable-xhdpi-v11/ic_menu_desktop_mode_on.png \
   res/drawable-xhdpi-v11/ic_menu_downloads.png \
   res/drawable-xhdpi-v11/ic_menu_find_in_page.png \
   res/drawable-xhdpi-v11/ic_menu_forward.png \
+  res/drawable-xhdpi-v11/ic_menu_new_private_tab.png \
+  res/drawable-xhdpi-v11/ic_menu_new_tab.png \
   res/drawable-xhdpi-v11/ic_menu_reload.png \
   res/drawable-xhdpi-v11/ic_menu_save_as_pdf.png \
   res/drawable-xhdpi-v11/ic_menu_settings.png \
   res/drawable-xhdpi-v11/ic_menu_share.png \
+  res/drawable-xhdpi-v11/ic_menu_synced_tabs.png \
   res/drawable-xhdpi-v11/ic_menu_tools.png \
   res/drawable-xhdpi-v11/ic_menu_quit.png \
   res/drawable-xhdpi-v11/ic_status_logo.png \
   res/drawable-xhdpi-v11/menu.png \
   res/drawable-xhdpi-v11/menu_panel_bg.9.png \
   res/drawable-xhdpi-v11/menu_popup_bg.9.png \
   res/drawable-xhdpi-v11/menu_popup_arrow.png \
   res/drawable-xhdpi-v11/menu_item_check.png \
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -49,17 +49,16 @@
 <!ENTITY reload "Reload">
 <!ENTITY forward "Forward">
 <!ENTITY menu "Menu">
 <!ENTITY back "Back">
 <!ENTITY stop "Stop">
 <!ENTITY site_security "Site Security">
 
 <!ENTITY close_tab "Close Tab">
-<!ENTITY new_tab "New Tab">
 <!ENTITY one_tab "1 tab">
 <!-- Localization note (num_tabs2) : Number of tabs is always more than one.
      We can't use android plural forms, sadly. See bug #753859. -->
 <!ENTITY num_tabs2 "&formatD; tabs">
 <!ENTITY new_tab_opened "New tab opened">
 
 <!ENTITY settings "Settings">
 <!ENTITY settings_title "Settings">
@@ -131,17 +130,20 @@ size. -->
 
 <!ENTITY share "Share">
 <!ENTITY share_title "Share via">
 <!ENTITY share_image_failed "Unable to share this image">
 <!ENTITY save_as_pdf "Save as PDF">
 <!ENTITY find_in_page "Find in Page">
 <!ENTITY desktop_mode "Request Desktop Site">
 <!ENTITY tools "Tools">
-<!ENTITY new_pb_tab "New Private Browsing Tab">
+<!ENTITY new_tab "New Tab">
+<!ENTITY new_private_tab "New Private Tab">
+<!ENTITY synced_tabs "Synced Tabs">
+<!ENTITY close_all_tabs "Close All Tabs">
 
 <!-- Localization note (find_text, find_prev, find_next, find_close) : These strings are used
      as alternate text for accessibility. They are not visible in the UI. -->
 <!ENTITY find_text "Find in Page">
 <!ENTITY find_prev "Previous">
 <!ENTITY find_next "Next">
 <!ENTITY find_close "Close">
 
deleted file mode 100644
index 566c16ada6502bc8b756af9d2b6211c9d7b60132..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index abd643680023f6a0d3339bdd6400bd19eda1c986..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 93647cf4209bed5818f560c4497d3a6e428541eb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 9d66e23e1304efdb967d4733a40b9fe4c9c85e74..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ea25bfa40933da3cdaf30181eb91cc7d8dd3a920..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 728c6c1d513bcaf27e71b69e99e3cadae283496d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in
@@ -14,33 +14,37 @@
           android:icon="@drawable/ic_menu_forward"
           android:title="@string/forward"
           android:visible="false"/>
 
     <item android:id="@+id/bookmark"
           android:icon="@drawable/ic_menu_bookmark_add"
           android:title="@string/bookmark"/>
 
+    <item android:id="@+id/new_tab"
+          android:icon="@drawable/ic_menu_new_tab"
+          android:title="@string/new_tab"/>
+
+    <item android:id="@+id/new_private_tab"
+          android:icon="@drawable/ic_menu_new_private_tab"
+          android:title="@string/new_private_tab"/>
+
     <item android:id="@+id/share"
           android:icon="@drawable/ic_menu_share"
           android:title="@string/share" /> 
     
     <item android:id="@+id/find_in_page"
           android:icon="@drawable/ic_menu_find_in_page"
           android:title="@string/find_in_page" />
 
     <item android:id="@+id/desktop_mode"
           android:icon="@drawable/ic_menu_desktop_mode_off"
           android:title="@string/desktop_mode"
           android:checkable="true" />
 
-    <item android:id="@+id/private_browsing"
-          android:visible="false"
-          android:title="@string/new_pb_tab"/>
-
     <item android:title="@string/tools"
           android:icon="@drawable/ic_menu_tools">
 
         <menu>
 
             <item android:id="@+id/save_as_pdf"
                   android:icon="@drawable/ic_menu_save_as_pdf"
                   android:title="@string/save_as_pdf" />
--- a/mobile/android/base/resources/menu-v11/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu-v11/browser_app_menu.xml.in
@@ -15,33 +15,37 @@
           android:title="@string/reload"
           android:showAsAction="always"/>
 
     <item android:id="@+id/bookmark"
           android:icon="@drawable/ic_menu_bookmark_add"
           android:title="@string/bookmark"
           android:showAsAction="always"/>
 
+    <item android:id="@+id/new_tab"
+          android:icon="@drawable/ic_menu_new_tab"
+          android:title="@string/new_tab"/>
+
+    <item android:id="@+id/new_private_tab"
+          android:icon="@drawable/ic_menu_new_private_tab"
+          android:title="@string/new_private_tab"/>
+
     <item android:id="@+id/share"
           android:icon="@drawable/ic_menu_share"
           android:title="@string/share" /> 
     
     <item android:id="@+id/find_in_page"
           android:icon="@drawable/ic_menu_find_in_page"
           android:title="@string/find_in_page" />
 
     <item android:id="@+id/desktop_mode"
           android:icon="@drawable/ic_menu_desktop_mode_off"
           android:title="@string/desktop_mode"
           android:checkable="true" />
 
-    <item android:id="@+id/private_browsing"
-          android:visible="false"
-          android:title="@string/new_pb_tab"/>
-
     <item android:title="@string/tools"
           android:icon="@drawable/ic_menu_tools">
 
         <menu>
 
             <item android:id="@+id/save_as_pdf"
                   android:icon="@drawable/ic_menu_save_as_pdf"
                   android:title="@string/save_as_pdf" />
--- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml.in
@@ -15,33 +15,37 @@
           android:title="@string/forward"
           android:visible="false"/>
 
     <item android:id="@+id/bookmark"
           android:icon="@drawable/ic_menu_bookmark_add"
           android:title="@string/bookmark"
           android:showAsAction="always"/>
 
+    <item android:id="@+id/new_tab"
+          android:icon="@drawable/ic_menu_new_tab"
+          android:title="@string/new_tab"/>
+
+    <item android:id="@+id/new_private_tab"
+          android:icon="@drawable/ic_menu_new_private_tab"
+          android:title="@string/new_private_tab"/>
+
     <item android:id="@+id/share"
           android:icon="@drawable/ic_menu_share"
           android:title="@string/share" /> 
     
     <item android:id="@+id/find_in_page"
           android:icon="@drawable/ic_menu_find_in_page"
           android:title="@string/find_in_page" />
 
     <item android:id="@+id/desktop_mode"
           android:icon="@drawable/ic_menu_desktop_mode_off"
           android:title="@string/desktop_mode"
           android:checkable="true" />
 
-    <item android:id="@+id/private_browsing"
-          android:visible="false"
-          android:title="@string/new_pb_tab"/>
-
     <item android:title="@string/tools"
           android:icon="@drawable/ic_menu_tools">
 
         <menu>
 
             <item android:id="@+id/save_as_pdf"
                   android:icon="@drawable/ic_menu_save_as_pdf"
                   android:title="@string/save_as_pdf" />
--- a/mobile/android/base/resources/menu/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu/browser_app_menu.xml.in
@@ -12,35 +12,37 @@
     <item android:id="@+id/forward"
           android:icon="@drawable/ic_menu_forward"
           android:title="@string/forward"/>
 
     <item android:id="@+id/bookmark"
           android:icon="@drawable/ic_menu_bookmark_add"
           android:title="@string/bookmark"/>
 
+    <item android:id="@+id/new_tab"
+          android:icon="@drawable/ic_menu_new_tab"
+          android:title="@string/new_tab"/>
+
+    <item android:id="@+id/new_private_tab"
+          android:icon="@drawable/ic_menu_new_private_tab"
+          android:title="@string/new_private_tab"/>
+
     <item android:id="@+id/share"
-          android:icon="@drawable/ic_menu_share"
           android:title="@string/share" /> 
     
     <item android:id="@+id/save_as_pdf"
-          android:icon="@drawable/ic_menu_save_as_pdf"
           android:title="@string/save_as_pdf" />
 
     <item android:id="@+id/find_in_page"
           android:title="@string/find_in_page" />
 
     <item android:id="@+id/desktop_mode"
           android:title="@string/desktop_mode"
           android:checkable="true" />
 
-    <item android:id="@+id/private_browsing"
-          android:visible="false"
-          android:title="@string/new_pb_tab"/>
-
     <item android:id="@+id/addons"
           android:title="@string/addons"/>
 
     <item android:id="@+id/downloads"
           android:title="@string/downloads"/>
 
     <item android:id="@+id/apps"
           android:title="@string/apps"/>
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -126,25 +126,27 @@
   <string name="search">&search;</string>
   <string name="reload">&reload;</string>
   <string name="forward">&forward;</string>
   <string name="menu">&menu;</string>
   <string name="back">&back;</string>
   <string name="stop">&stop;</string>
   <string name="site_security">&site_security;</string>
   <string name="close_tab">&close_tab;</string>
-  <string name="new_tab">&new_tab;</string>
   <string name="new_tab_opened">&new_tab_opened;</string>
   <string name="one_tab">&one_tab;</string>
   <string name="num_tabs">&num_tabs2;</string>
   <string name="addons">&addons;</string>
   <string name="downloads">&downloads;</string>
   <string name="apps">&apps;</string>
   <string name="char_encoding">&char_encoding;</string>
-  <string name="new_pb_tab">&new_pb_tab;</string>
+  <string name="new_tab">&new_tab;</string>
+  <string name="new_private_tab">&new_private_tab;</string>
+  <string name="synced_tabs">&synced_tabs;</string>
+  <string name="close_all_tabs">&close_all_tabs;</string>
   <!-- This string only appears in developer builds, which
        is why it is not localizable. -->
   <string name="toggle_profiling">Toggle Profiling</string>
 
   <string name="site_settings_title">&site_settings_title2;</string>
   <string name="site_settings_cancel">&site_settings_cancel;</string>
   <string name="site_settings_clear">&site_settings_clear;</string>
   <string name="site_settings_no_settings">&site_settings_no_settings;</string>