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

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

Issue 990183004: Revert of [Android] Fix a flicker in stopping Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REbase Created 5 years, 9 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 assert window != null; 81 assert window != null;
82 mWindow = window; 82 mWindow = window;
83 mContentViewRenderView = new ContentViewRenderView(getContext()) { 83 mContentViewRenderView = new ContentViewRenderView(getContext()) {
84 @Override 84 @Override
85 protected void onReadyToRender() { 85 protected void onReadyToRender() {
86 if (sStartup) { 86 if (sStartup) {
87 if (initialLoadingNeeded) mActiveShell.loadUrl(mStartupUrl); 87 if (initialLoadingNeeded) mActiveShell.loadUrl(mStartupUrl);
88 sStartup = false; 88 sStartup = false;
89 } 89 }
90 } 90 }
91
92 @Override
93 protected void onWindowVisibilityChanged(int visibility) {
94 if (visibility == View.GONE && mActiveShell != null) {
95 ContentViewCore contentViewCore = mActiveShell.getContentVie wCore();
96 if (contentViewCore != null) contentViewCore.onHide();
97 }
98 super.onWindowVisibilityChanged(visibility);
99 }
100 }; 91 };
101 mContentViewRenderView.onNativeLibraryLoaded(window); 92 mContentViewRenderView.onNativeLibraryLoaded(window);
102 } 93 }
103 94
104 /** 95 /**
105 * @return The window used to generate all shells. 96 * @return The window used to generate all shells.
106 */ 97 */
107 public WindowAndroid getWindow() { 98 public WindowAndroid getWindow() {
108 return mWindow; 99 return mWindow;
109 } 100 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (shellView.getParent() == null) return; 174 if (shellView.getParent() == null) return;
184 ContentViewCore contentViewCore = shellView.getContentViewCore(); 175 ContentViewCore contentViewCore = shellView.getContentViewCore();
185 if (contentViewCore != null) contentViewCore.onHide(); 176 if (contentViewCore != null) contentViewCore.onHide();
186 shellView.setContentViewRenderView(null); 177 shellView.setContentViewRenderView(null);
187 removeView(shellView); 178 removeView(shellView);
188 } 179 }
189 180
190 private static native void nativeInit(Object shellManagerInstance); 181 private static native void nativeInit(Object shellManagerInstance);
191 private static native void nativeLaunchShell(String url); 182 private static native void nativeLaunchShell(String url);
192 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698