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

Side by Side Diff: chrome/browser/ui/exclusive_access/fullscreen_controller_test.cc

Issue 2004353002: Delete unused code for exclusive access permission prompting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fullscreen-mac-remove-window-controller
Patch Set: Remove changes to content settings UI (spun out to CL 2045163002). 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" 5 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 bool FullscreenControllerTest::IsFullscreenForBrowser() { 54 bool FullscreenControllerTest::IsFullscreenForBrowser() {
55 return GetFullscreenController()->IsFullscreenForBrowser(); 55 return GetFullscreenController()->IsFullscreenForBrowser();
56 } 56 }
57 57
58 bool FullscreenControllerTest::IsWindowFullscreenForTabOrPending() { 58 bool FullscreenControllerTest::IsWindowFullscreenForTabOrPending() {
59 return GetFullscreenController()->IsWindowFullscreenForTabOrPending(); 59 return GetFullscreenController()->IsWindowFullscreenForTabOrPending();
60 } 60 }
61 61
62 bool FullscreenControllerTest::IsMouseLockPermissionRequested() {
63 ExclusiveAccessBubbleType type = GetExclusiveAccessBubbleType();
64 bool mouse_lock = false;
65 exclusive_access_bubble::PermissionRequestedByType(type, NULL, &mouse_lock);
66 return mouse_lock;
67 }
68
69 bool FullscreenControllerTest::IsFullscreenPermissionRequested() {
70 ExclusiveAccessBubbleType type = GetExclusiveAccessBubbleType();
71 bool fullscreen = false;
72 exclusive_access_bubble::PermissionRequestedByType(type, &fullscreen, NULL);
73 return fullscreen;
74 }
75
76 ExclusiveAccessBubbleType 62 ExclusiveAccessBubbleType
77 FullscreenControllerTest::GetExclusiveAccessBubbleType() { 63 FullscreenControllerTest::GetExclusiveAccessBubbleType() {
78 return GetExclusiveAccessManager()->GetExclusiveAccessExitBubbleType(); 64 return GetExclusiveAccessManager()->GetExclusiveAccessExitBubbleType();
79 } 65 }
80 66
81 bool FullscreenControllerTest::IsFullscreenBubbleDisplayed() { 67 bool FullscreenControllerTest::IsFullscreenBubbleDisplayed() {
82 return GetExclusiveAccessBubbleType() != EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE; 68 return GetExclusiveAccessBubbleType() != EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE;
83 } 69 }
84 70
85 bool FullscreenControllerTest::IsFullscreenBubbleDisplayingButtons() {
86 return exclusive_access_bubble::ShowButtonsForType(
87 GetExclusiveAccessBubbleType());
88 }
89
90 void FullscreenControllerTest::AcceptCurrentFullscreenOrMouseLockRequest() {
91 GetExclusiveAccessManager()->OnAcceptExclusiveAccessPermission();
92 }
93
94 void FullscreenControllerTest::DenyCurrentFullscreenOrMouseLockRequest() {
95 GetExclusiveAccessManager()->OnDenyExclusiveAccessPermission();
96 }
97
98 void FullscreenControllerTest::GoBack() { 71 void FullscreenControllerTest::GoBack() {
99 content::TestNavigationObserver observer( 72 content::TestNavigationObserver observer(
100 browser()->tab_strip_model()->GetActiveWebContents(), 1); 73 browser()->tab_strip_model()->GetActiveWebContents(), 1);
101 chrome::GoBack(browser(), CURRENT_TAB); 74 chrome::GoBack(browser(), CURRENT_TAB);
102 observer.Wait(); 75 observer.Wait();
103 } 76 }
104 77
105 void FullscreenControllerTest::Reload() { 78 void FullscreenControllerTest::Reload() {
106 content::TestNavigationObserver observer( 79 content::TestNavigationObserver observer(
107 browser()->tab_strip_model()->GetActiveWebContents(), 1); 80 browser()->tab_strip_model()->GetActiveWebContents(), 1);
108 chrome::Reload(browser(), CURRENT_TAB); 81 chrome::Reload(browser(), CURRENT_TAB);
109 observer.Wait(); 82 observer.Wait();
110 } 83 }
111 84
112 void FullscreenControllerTest::SetPrivilegedFullscreen(bool is_privileged) { 85 void FullscreenControllerTest::SetPrivilegedFullscreen(bool is_privileged) {
113 GetFullscreenController()->SetPrivilegedFullscreenForTesting(is_privileged); 86 GetFullscreenController()->SetPrivilegedFullscreenForTesting(is_privileged);
114 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698