Bug 950919 - (Part 1) Get rid of loadHomePage method. r=mcomella
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 17 Dec 2013 22:43:30 -0800
changeset 161015 9c9c3e3e7bc25ba3beb7f0e55a7ea7ae57749900
parent 161014 837203a4e0768cf31088280f0d43191593f7c677
child 161016 ba6f87308d4808e7955df374ec29cbbb8552a768
push id25862
push usercbook@mozilla.com
push dateWed, 18 Dec 2013 11:40:53 +0000
treeherdermozilla-central@60373454fc52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs950919
milestone29.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 950919 - (Part 1) Get rid of loadHomePage method. r=mcomella
mobile/android/base/BrowserApp.java
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1217,17 +1217,18 @@ abstract public class BrowserApp extends
             }
         } catch (Exception e) {
             Log.e(LOGTAG, "Exception handling message \"" + event + "\":", e);
         }
     }
 
     @Override
     public void addTab() {
-        super.loadHomePage(Tabs.LOADURL_NEW_TAB);
+        // Always load about:home when opening a new tab.
+        Tabs.getInstance().loadUrl(AboutPages.HOME, Tabs.LOADURL_NEW_TAB);
     }
 
     @Override
     public void addPrivateTab() {
         Tabs.getInstance().loadUrl(AboutPages.PRIVATEBROWSING, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE);
     }
 
     @Override
@@ -1389,17 +1390,17 @@ abstract public class BrowserApp extends
         mBrowserToolbar.cancelEdit();
     }
 
     private boolean isHomePagerVisible() {
         return (mHomePager != null && mHomePager.isVisible());
     }
 
     private void openReadingList() {
-        super.loadHomePage(Tabs.LOADURL_READING_LIST);
+        Tabs.getInstance().loadUrl(AboutPages.HOME, Tabs.LOADURL_READING_LIST);
     }
 
     /* Favicon stuff. */
     private static OnFaviconLoadedListener sFaviconLoadedListener = new OnFaviconLoadedListener() {
         @Override
         public void onFaviconLoaded(String pageUrl, String faviconURL, Bitmap favicon) {
             // If we failed to load a favicon, we use the default favicon instead.
             Tabs.getInstance()
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1406,33 +1406,25 @@ public abstract class GeckoApp
      *
      * @param url External URL to load, or null to load the default URL
      */
     protected void loadStartupTab(String url) {
         if (url == null) {
             if (!mShouldRestore) {
                 // Show about:home if we aren't restoring previous session and
                 // there's no external URL.
-                loadHomePage(Tabs.LOADURL_NEW_TAB);
+                Tabs.getInstance().loadUrl(AboutPages.HOME, Tabs.LOADURL_NEW_TAB);
             }
         } else {
             // If given an external URL, load it
             int flags = Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED | Tabs.LOADURL_EXTERNAL;
             Tabs.getInstance().loadUrl(url, flags);
         }
     }
 
-    protected Tab loadHomePage() {
-        return loadHomePage(Tabs.LOADURL_NONE);
-    }
-
-    protected Tab loadHomePage(int flags) {
-        return Tabs.getInstance().loadUrl(AboutPages.HOME, flags);
-    }
-
     private void initialize() {
         mInitialized = true;
 
         if (Build.VERSION.SDK_INT >= 11) {
             // Create the panel and inflate the custom menu.
             onCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, null);
         }
         invalidateOptionsMenu();