Chromium Code Reviews

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

Issue 1854253002: Disable document mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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; 5 package org.chromium.chrome.browser;
6 6
7 import android.app.ActionBar; 7 import android.app.ActionBar;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
11 import android.net.Uri; 11 import android.net.Uri;
12 import android.view.Menu; 12 import android.view.Menu;
13 import android.view.MenuItem; 13 import android.view.MenuItem;
14 import android.view.View; 14 import android.view.View;
15 15
16 import org.chromium.chrome.R; 16 import org.chromium.chrome.R;
17 import org.chromium.chrome.browser.firstrun.FirstRunFlowSequencer;
18 import org.chromium.chrome.browser.firstrun.FirstRunStatus; 17 import org.chromium.chrome.browser.firstrun.FirstRunStatus;
19 import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager; 18 import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
20 import org.chromium.chrome.browser.tab.Tab; 19 import org.chromium.chrome.browser.tab.Tab;
21 import org.chromium.chrome.browser.tabmodel.document.TabDelegate; 20 import org.chromium.chrome.browser.tabmodel.document.TabDelegate;
22 import org.chromium.chrome.browser.webapps.FullScreenActivity; 21 import org.chromium.chrome.browser.webapps.FullScreenActivity;
23 import org.chromium.content_public.browser.LoadUrlParams; 22 import org.chromium.content_public.browser.LoadUrlParams;
24 import org.chromium.ui.base.PageTransition; 23 import org.chromium.ui.base.PageTransition;
25 24
26 /** 25 /**
27 * An activity that shows a webpage with a title above it. No navigation control s or menu is 26 * An activity that shows a webpage with a title above it. No navigation control s or menu is
(...skipping 90 matching lines...)
118 return false; 117 return false;
119 } 118 }
120 119
121 @Override 120 @Override
122 protected void setStatusBarColor(Tab tab, int color) { 121 protected void setStatusBarColor(Tab tab, int color) {
123 // Intentionally do nothing as EmbedContentViewActivity does not set sta tus bar color. 122 // Intentionally do nothing as EmbedContentViewActivity does not set sta tus bar color.
124 } 123 }
125 124
126 @Override 125 @Override
127 protected TabDelegate createTabDelegate(boolean incognito) { 126 protected TabDelegate createTabDelegate(boolean incognito) {
128 return new TabDelegate(incognito) { 127 return new TabDelegate(incognito);
129 @Override
130 protected boolean isAllowedToLaunchDocumentActivity(Context context) {
131 // Catch a corner case where the user can bypass the ToS. crbug .com/516645
132 return FirstRunFlowSequencer.checkIfFirstRunIsNecessary(context, false) == null;
133 }
134 };
135 } 128 }
136 } 129 }
OLDNEW

Powered by Google App Engine