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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java

Issue 2764673002: Embedded media: Rotate to fullscreen
Patch Set: Created 3 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.fullscreen; 5 package org.chromium.chrome.browser.fullscreen;
6 6
7 import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN; 7 import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN;
8 import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; 8 import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
9 import static android.view.View.SYSTEM_UI_FLAG_LOW_PROFILE; 9 import static android.view.View.SYSTEM_UI_FLAG_LOW_PROFILE;
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN does not always trigger a vi ew-level layout 284 // SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN does not always trigger a vi ew-level layout
285 // with an updated height. To work around this, do not check fo r an increased 285 // with an updated height. To work around this, do not check fo r an increased
286 // height and always just trigger the next step of the fullscree n initialization. 286 // height and always just trigger the next step of the fullscree n initialization.
287 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { 287 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
288 // Posting the message to set the fullscreen flag because se tting it 288 // Posting the message to set the fullscreen flag because se tting it
289 // directly in the onLayoutChange would have no effect. 289 // directly in the onLayoutChange would have no effect.
290 mHandler.sendEmptyMessage(MSG_ID_SET_FULLSCREEN_SYSTEM_UI_FL AGS); 290 mHandler.sendEmptyMessage(MSG_ID_SET_FULLSCREEN_SYSTEM_UI_FL AGS);
291 } 291 }
292 292
293 if ((bottom - top) <= (oldBottom - oldTop)) return; 293 if ((bottom - top) <= (oldBottom - oldTop)) return;
294 if (mDelegate.shouldShowNotificationToast()) { 294 if (mDelegate.shouldShowNotificationToast()
295 && !tab.getEmbeddedMediaExperienceEnabled()) {
295 showNotificationToast(); 296 showNotificationToast();
296 } 297 }
297 contentView.removeOnLayoutChangeListener(this); 298 contentView.removeOnLayoutChangeListener(this);
298 } 299 }
299 }; 300 };
300 contentView.addOnLayoutChangeListener(mFullscreenOnLayoutChangeListener) ; 301 contentView.addOnLayoutChangeListener(mFullscreenOnLayoutChangeListener) ;
301 contentView.setSystemUiVisibility(systemUiVisibility); 302 contentView.setSystemUiVisibility(systemUiVisibility);
302 303
303 // Request a layout so the updated system visibility takes affect. 304 // Request a layout so the updated system visibility takes affect.
304 contentView.requestLayout(); 305 contentView.requestLayout();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 private static int getExtraFullscreenUIFlags() { 367 private static int getExtraFullscreenUIFlags() {
367 int flags = 0; 368 int flags = 0;
368 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { 369 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
369 flags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; 370 flags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
370 flags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; 371 flags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
371 flags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; 372 flags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
372 } 373 }
373 return flags; 374 return flags;
374 } 375 }
375 } 376 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698