Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: content/shell/android/java/src/org/chromium/content_shell/ShellManager.java

Issue 843883002: [Android] Fix a flicker in stopping Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added 'onActivityStop()' back in order not to break downstream Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content_shell; 5 package org.chromium.content_shell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.util.AttributeSet; 9 import android.util.AttributeSet;
10 import android.view.LayoutInflater; 10 import android.view.LayoutInflater;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 assert window != null; 71 assert window != null;
72 mWindow = window; 72 mWindow = window;
73 mContentViewRenderView = new ContentViewRenderView(getContext()) { 73 mContentViewRenderView = new ContentViewRenderView(getContext()) {
74 @Override 74 @Override
75 protected void onReadyToRender() { 75 protected void onReadyToRender() {
76 if (sStartup) { 76 if (sStartup) {
77 mActiveShell.loadUrl(mStartupUrl); 77 mActiveShell.loadUrl(mStartupUrl);
78 sStartup = false; 78 sStartup = false;
79 } 79 }
80 } 80 }
81
82 @Override
83 protected void onWindowVisibilityChanged(int visibility) {
84 if (visibility == View.GONE && mActiveShell != null) {
85 ContentViewCore contentViewCore = mActiveShell.getContentVie wCore();
86 if (contentViewCore != null) contentViewCore.onHide();
87 }
88 super.onWindowVisibilityChanged(visibility);
89 }
81 }; 90 };
82 mContentViewRenderView.onNativeLibraryLoaded(window); 91 mContentViewRenderView.onNativeLibraryLoaded(window);
83 } 92 }
84 93
85 /** 94 /**
86 * @return The window used to generate all shells. 95 * @return The window used to generate all shells.
87 */ 96 */
88 public WindowAndroid getWindow() { 97 public WindowAndroid getWindow() {
89 return mWindow; 98 return mWindow;
90 } 99 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (shellView.getParent() == null) return; 166 if (shellView.getParent() == null) return;
158 ContentViewCore contentViewCore = shellView.getContentViewCore(); 167 ContentViewCore contentViewCore = shellView.getContentViewCore();
159 if (contentViewCore != null) contentViewCore.onHide(); 168 if (contentViewCore != null) contentViewCore.onHide();
160 shellView.setContentViewRenderView(null); 169 shellView.setContentViewRenderView(null);
161 removeView(shellView); 170 removeView(shellView);
162 } 171 }
163 172
164 private static native void nativeInit(Object shellManagerInstance); 173 private static native void nativeInit(Object shellManagerInstance);
165 private static native void nativeLaunchShell(String url); 174 private static native void nativeLaunchShell(String url);
166 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698