Bug 801739 - Initialize mDoorHangerPopup in WebApp rather than GeckoApp. r=mleibovic
☠☠ backed out by 2b45a99e0108 ☠ ☠
authorShriram Kunchanapalli <kshriram18@gmail.com>
Wed, 26 Dec 2012 20:15:47 +0530
changeset 117510 b7f50cfa3fe1dffd3f608a318fe906bd86363526
parent 117509 ef515efc6ff77b12b92b6bda76311b4e427760e9
child 117511 cee0b66c744c565a9d69398f4f98bbe899adcb84
push id20544
push userryanvm@gmail.com
push dateThu, 03 Jan 2013 22:18:24 +0000
treeherdermozilla-inbound@29080e5ecaed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmleibovic
bugs801739
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 801739 - Initialize mDoorHangerPopup in WebApp rather than GeckoApp. r=mleibovic
mobile/android/base/BrowserApp.java
mobile/android/base/GeckoApp.java
mobile/android/base/WebApp.java.in
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -261,17 +261,17 @@ abstract public class BrowserApp extends
 
     @Override
     protected void initializeChrome(String uri, boolean isExternalURL) {
         super.initializeChrome(uri, isExternalURL);
 
         mBrowserToolbar.updateBackButton(false);
         mBrowserToolbar.updateForwardButton(false);
 
-        mDoorHangerPopup.setAnchor(mBrowserToolbar.mFavicon);
+        mDoorHangerPopup = new DoorHangerPopup(this, mBrowserToolbar.mFavicon);
 
         if (isExternalURL || mRestoreMode != RESTORE_NONE) {
             mAboutHomeStartupTimer.cancel();
         }
 
         if (!mIsRestoringActivity) {
             if (!isExternalURL) {
                 // show about:home if we aren't restoring previous session
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1640,17 +1640,16 @@ abstract public class GeckoApp
                 // on exit, or if we were suddenly killed (crash or native OOM)
                 editor.putBoolean(GeckoApp.PREFS_WAS_STOPPED, false);
                 editor.commit();
             }
         });
     }
 
     protected void initializeChrome(String uri, boolean isExternalURL) {
-        mDoorHangerPopup = new DoorHangerPopup(this, null);
         mPluginContainer = (AbsoluteLayout) findViewById(R.id.plugin_container);
         mFormAssistPopup = (FormAssistPopup) findViewById(R.id.form_assist_popup);
 
         if (cameraView == null) {
             cameraView = new SurfaceView(this);
             cameraView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
         }
 
--- a/mobile/android/base/WebApp.java.in
+++ b/mobile/android/base/WebApp.java.in
@@ -86,16 +86,17 @@ public class WebApp extends GeckoApp {
                 Log.e(LOGTAG, "Unable to parse intent url: ", ex);
             }
         }
     }
 
     @Override
     protected void initializeChrome(String uri, boolean isExternalURL) {
         super.initializeChrome(uri, isExternalURL);
+        mDoorHangerPopup = new DoorHangerPopup(this, null);
         Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED | Tabs.LOADURL_PINNED);
     }
 
     private void showSplash() {
         mSplashscreen = (RelativeLayout) findViewById(R.id.splashscreen);
 
         SharedPreferences prefs = getSharedPreferences("webapps", Context.MODE_PRIVATE | Context.MODE_MULTI_PROCESS);