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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/media/FullscreenMediaActivity.java

Issue 2807663002: 📺 Move fullscreen web content to a new Activity. (Closed)
Patch Set: Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.media;
6
7 import org.chromium.chrome.R;
8 import org.chromium.chrome.browser.IntentHandler;
9 import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
10 import org.chromium.chrome.browser.tab.Tab;
11 import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager;
12 import org.chromium.chrome.browser.tabmodel.TabReparentingParams;
13 import org.chromium.chrome.browser.util.IntentUtils;
14 import org.chromium.chrome.browser.webapps.FullScreenActivity;
15
16 /**
17 * An Activity used to display fullscreen web contents.
Bernhard Bauer 2017/04/07 20:08:59 …that is playing media? Or if we want this to be a
mlamouri (slow - plz ping) 2017/04/10 12:56:21 We don't know if an activity is playing media whil
PEConn 2017/04/11 00:54:46 Renamed to FullscreenWebContentsActivity - I would
18 */
19 public class FullscreenMediaActivity extends FullScreenActivity {
20 private Tab mTab;
21
22 @Override
23 protected Tab createTab() {
24 assert getIntent().hasExtra(IntentHandler.EXTRA_TAB_ID);
25
26 int tabId = IntentUtils.safeGetIntExtra(
27 getIntent(), IntentHandler.EXTRA_TAB_ID, Tab.INVALID_TAB_ID);
28 TabReparentingParams params = (TabReparentingParams) AsyncTabParamsManag er.remove(tabId);
29
30 mTab = params.getTabToReparent();
31 mTab.attachAndFinishReparenting(this, createTabDelegateFactory(), params );
Yusuf 2017/04/10 17:08:49 I don't think we need to cache this here since it
PEConn 2017/04/11 00:54:46 Oh yes sorry - I think this was cruft from an earl
32 return mTab;
33 }
34
35 @Override
36 protected int getControlContainerLayoutId() {
37 // TODO(peconn): Determine if there's something more suitable to use her e.
38 return R.layout.webapp_control_container;
39 }
40
41 @Override
42 protected ChromeFullscreenManager createFullscreenManager() {
43 // Create a Fullscreen manager that won't change the Tab's fullscreen st ate when the
44 // Activity ends - we handle leaving fullscreen ourselves.
45 return new ChromeFullscreenManager(this, false, false);
46 }
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698