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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java

Issue 2007833002: Delete FullscreenInfoBarDelegate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen-android-remove-flag
Patch Set: More cleanup suggested by Ted. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/res/drawable-xxxhdpi/infobar_fullscreen.png ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
deleted file mode 100644
index 91dac1271454225c505dc59c1be97641b0195d81..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenInfoBarDelegate.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.fullscreen;
-
-import org.chromium.base.annotations.CalledByNative;
-import org.chromium.chrome.browser.preferences.website.ContentSetting;
-import org.chromium.chrome.browser.preferences.website.FullscreenInfo;
-import org.chromium.chrome.browser.tab.Tab;
-
-// TODO(mgiuca): Delete this class (no longer used). https://crbug.com/610900.
-/**
- * Class for managing the fullscreen infobar.
- */
-public class FullscreenInfoBarDelegate {
- private final FullscreenHtmlApiHandler mHandler;
- private final boolean mIsForIncognitoTab;
- private long mNativeFullscreenInfoBarDelegate = 0;
-
- /**
- * Create a FullscreenInfoBarDelegate and show the infobar to user.
- *
- * @param handler Handler to exit the fullscreen when user click cancel on the info bar.
- * @param tab Tab that enters fullscreen.
- */
- public static FullscreenInfoBarDelegate create(FullscreenHtmlApiHandler handler, Tab tab) {
- return new FullscreenInfoBarDelegate(handler, tab);
- }
-
- private FullscreenInfoBarDelegate(
- FullscreenHtmlApiHandler handler, Tab tab) {
- assert tab != null;
- mHandler = handler;
- mIsForIncognitoTab = tab.isIncognito();
- mNativeFullscreenInfoBarDelegate = nativeLaunchFullscreenInfoBar(tab);
- }
-
- /**
- * Close the fullscreen infobar.
- */
- protected void closeFullscreenInfoBar() {
- if (mNativeFullscreenInfoBarDelegate != 0) {
- nativeCloseFullscreenInfoBar(mNativeFullscreenInfoBarDelegate);
- }
- }
-
- /**
- * Called when fullscreen is allowed for a particular origin.
- *
- * @param origin The site origin that fullscreen is allowed.
- */
- @CalledByNative
- private void onFullscreenAllowed(String origin) {
- FullscreenInfo fullscreenInfo = new FullscreenInfo(origin, null, mIsForIncognitoTab);
- fullscreenInfo.setContentSetting(ContentSetting.ALLOW);
- }
-
- /**
- * Called when fullscreen is cancelled on the infobar.
- */
- @CalledByNative
- private void onFullscreenCancelled() {
- mHandler.setPersistentFullscreenMode(false);
- }
-
- /**
- * Called when the infobar is dismissed.
- */
- @CalledByNative
- private void onInfoBarDismissed() {
- mNativeFullscreenInfoBarDelegate = 0;
- }
-
- private native long nativeLaunchFullscreenInfoBar(Tab tab);
- private native void nativeCloseFullscreenInfoBar(long nativeFullscreenInfoBarDelegate);
-}
« no previous file with comments | « chrome/android/java/res/drawable-xxxhdpi/infobar_fullscreen.png ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698