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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenActivity.java

Issue 2642303002: PlzNavigate: Chrome UI changes for new methods of WebContentsObserver (Closed)
Patch Set: isFragmentNavigation Created 3 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.chrome.browser.webapps; 5 package org.chromium.chrome.browser.webapps;
6 6
7 import android.content.Intent; 7 import android.content.Intent;
8 import android.util.Pair; 8 import android.util.Pair;
9 import android.view.View; 9 import android.view.View;
10 import android.view.ViewGroup; 10 import android.view.ViewGroup;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 mWebContentsObserver.destroy(); 162 mWebContentsObserver.destroy();
163 mWebContentsObserver = null; 163 mWebContentsObserver = null;
164 } 164 }
165 165
166 mWebContents = webContents; 166 mWebContents = webContents;
167 if (mWebContents == null) return; 167 if (mWebContents == null) return;
168 168
169 ContentViewCore.fromWebContents(webContents).setFullscreenRequiredForOri entationLock(false); 169 ContentViewCore.fromWebContents(webContents).setFullscreenRequiredForOri entationLock(false);
170 mWebContentsObserver = new WebContentsObserver(webContents) { 170 mWebContentsObserver = new WebContentsObserver(webContents) {
171 @Override 171 @Override
172 public void didCommitProvisionalLoadForFrame( 172 public void didFinishNavigation(String url, boolean isInMainFrame, b oolean isErrorPage,
173 long frameId, boolean isMainFrame, String url, int transitio nType) { 173 boolean hasCommitted, boolean isSamePage, boolean isFragment Navigation,
174 if (!isMainFrame) return; 174 Integer pageTransition, int errorCode, int httpStatusCode) {
175 // Notify the renderer to permanently hide the top controls sinc e they do 175 if (hasCommitted && isInMainFrame) {
176 // not apply to fullscreen content views. 176 // Notify the renderer to permanently hide the top controls since they do
177 mTab.updateBrowserControlsState(mTab.getBrowserControlsStateCons traints(), true); 177 // not apply to fullscreen content views.
178 mTab.updateBrowserControlsState(
179 mTab.getBrowserControlsStateConstraints(), true);
180 }
178 } 181 }
179 }; 182 };
180 } 183 }
181 184
182 /** 185 /**
183 * @return {@link TabDelegateFactory} to be used while creating the associat ed {@link Tab}. 186 * @return {@link TabDelegateFactory} to be used while creating the associat ed {@link Tab}.
184 */ 187 */
185 protected TabDelegateFactory createTabDelegateFactory() { 188 protected TabDelegateFactory createTabDelegateFactory() {
186 return new FullScreenDelegateFactory(); 189 return new FullScreenDelegateFactory();
187 } 190 }
(...skipping 12 matching lines...) Expand all
200 mTab.goBack(); 203 mTab.goBack();
201 return true; 204 return true;
202 } 205 }
203 return false; 206 return false;
204 } 207 }
205 208
206 @Override 209 @Override
207 public void onCheckForUpdate(boolean updateAvailable) { 210 public void onCheckForUpdate(boolean updateAvailable) {
208 } 211 }
209 } 212 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698