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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

Issue 2640023008: Enabling autoplay and fullscreen for downloaded media (Closed)
Patch Set: dtrainor@ comments 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.customtabs; 5 package org.chromium.chrome.browser.customtabs;
6 6
7 import android.app.PendingIntent; 7 import android.app.PendingIntent;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if (!mHasPrerendered) { 533 if (!mHasPrerendered) {
534 customTabsConnection.resetPostMessageHandlerForSession(mSession, web Contents); 534 customTabsConnection.resetPostMessageHandlerForSession(mSession, web Contents);
535 } 535 }
536 tab.initialize( 536 tab.initialize(
537 webContents, getTabContentManager(), 537 webContents, getTabContentManager(),
538 new CustomTabDelegateFactory( 538 new CustomTabDelegateFactory(
539 mIntentDataProvider.shouldEnableUrlBarHiding(), 539 mIntentDataProvider.shouldEnableUrlBarHiding(),
540 mIntentDataProvider.isOpenedByChrome(), 540 mIntentDataProvider.isOpenedByChrome(),
541 getFullscreenManager().getBrowserVisibilityDelegate()), 541 getFullscreenManager().getBrowserVisibilityDelegate()),
542 false, false); 542 false, false);
543
544 if (mIntentDataProvider.shouldEnableEmbeddedMediaExperience()) {
545 tab.enableEmbeddedMediaExperience(true);
546 }
547
543 initializeMainTab(tab); 548 initializeMainTab(tab);
544 return tab; 549 return tab;
545 } 550 }
546 551
547 private void initializeMainTab(Tab tab) { 552 private void initializeMainTab(Tab tab) {
548 tab.getTabRedirectHandler().updateIntent(getIntent()); 553 tab.getTabRedirectHandler().updateIntent(getIntent());
549 tab.getView().requestFocus(); 554 tab.getView().requestFocus();
550 mTabObserver = new CustomTabObserver( 555 mTabObserver = new CustomTabObserver(
551 getApplication(), mSession, mIntentDataProvider.isOpenedByChrome ()); 556 getApplication(), mSession, mIntentDataProvider.isOpenedByChrome ());
552 557
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 Intent intent = ChromeLauncherActivity.createCustomTabActivityIntent( 1074 Intent intent = ChromeLauncherActivity.createCustomTabActivityIntent(
1070 context, customTabIntent.intent, false); 1075 context, customTabIntent.intent, false);
1071 intent.setPackage(context.getPackageName()); 1076 intent.setPackage(context.getPackageName());
1072 intent.putExtra(CustomTabIntentDataProvider.EXTRA_IS_INFO_PAGE, true); 1077 intent.putExtra(CustomTabIntentDataProvider.EXTRA_IS_INFO_PAGE, true);
1073 intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()); 1078 intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
1074 IntentHandler.addTrustedIntentExtras(intent); 1079 IntentHandler.addTrustedIntentExtras(intent);
1075 1080
1076 context.startActivity(intent); 1081 context.startActivity(intent);
1077 } 1082 }
1078 } 1083 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698