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

Side by Side Diff: chrome/browser/ui/fullscreen/fullscreen_controller.h

Issue 98523003: Implement "presentation" feature for window.open() Base URL: https://github.com/drott/cameo.git@presentationWindowSquashed
Patch Set: Created 7 years 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 #ifndef CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" 10 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bool IsFullscreenForTabOrPending() const; 57 bool IsFullscreenForTabOrPending() const;
58 bool IsFullscreenForTabOrPending( 58 bool IsFullscreenForTabOrPending(
59 const content::WebContents* web_contents) const; 59 const content::WebContents* web_contents) const;
60 // True if fullscreen was entered because of tab fullscreen (was not 60 // True if fullscreen was entered because of tab fullscreen (was not
61 // previously in browser fullscreen). 61 // previously in browser fullscreen).
62 bool IsFullscreenCausedByTab() const; 62 bool IsFullscreenCausedByTab() const;
63 63
64 void ToggleFullscreenModeForTab(content::WebContents* web_contents, 64 void ToggleFullscreenModeForTab(content::WebContents* web_contents,
65 bool enter_fullscreen); 65 bool enter_fullscreen);
66 66
67 // Presentation API Fullscreen //////////////////////////////////////////////
68 void TogglePresentationMode();
69 bool IsPresentationFullscreen();
70
67 // Extension API implementation uses this method to toggle fullscreen mode. 71 // Extension API implementation uses this method to toggle fullscreen mode.
68 // The extension's name is displayed in the full screen bubble UI to attribute 72 // The extension's name is displayed in the full screen bubble UI to attribute
69 // the cause of the full screen state change. 73 // the cause of the full screen state change.
70 void ToggleFullscreenModeWithExtension(const GURL& extension_url); 74 void ToggleFullscreenModeWithExtension(const GURL& extension_url);
71 75
72 // Platform Fullscreen /////////////////////////////////////////////////////// 76 // Platform Fullscreen ///////////////////////////////////////////////////////
73 77
74 // Returns whether we are currently in a Metro snap view. 78 // Returns whether we are currently in a Metro snap view.
75 bool IsInMetroSnapMode(); 79 bool IsInMetroSnapMode();
76 80
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 MOUSELOCK_ACCEPTED, 141 MOUSELOCK_ACCEPTED,
138 // Mouse lock has been silently accepted, no notification to user. 142 // Mouse lock has been silently accepted, no notification to user.
139 MOUSELOCK_ACCEPTED_SILENTLY 143 MOUSELOCK_ACCEPTED_SILENTLY
140 }; 144 };
141 145
142 enum FullscreenInternalOption { 146 enum FullscreenInternalOption {
143 BROWSER, 147 BROWSER,
144 #if defined(OS_MACOSX) 148 #if defined(OS_MACOSX)
145 BROWSER_WITH_CHROME, 149 BROWSER_WITH_CHROME,
146 #endif 150 #endif
147 TAB 151 TAB,
152 PRESENTATION // a special BROWSER mode with a different Exit Bubble,
153 // which leads to closing the browser window.
148 }; 154 };
149 155
150 void UpdateNotificationRegistrations(); 156 void UpdateNotificationRegistrations();
151 157
152 // Posts a task to call NotifyFullscreenChange. 158 // Posts a task to call NotifyFullscreenChange.
153 void PostFullscreenChangeNotification(bool is_fullscreen); 159 void PostFullscreenChangeNotification(bool is_fullscreen);
154 // Sends a NOTIFICATION_FULLSCREEN_CHANGED notification. 160 // Sends a NOTIFICATION_FULLSCREEN_CHANGED notification.
155 void NotifyFullscreenChange(bool is_fullscreen); 161 void NotifyFullscreenChange(bool is_fullscreen);
156 // Notifies the tab that it has been forced out of fullscreen and mouse lock 162 // Notifies the tab that it has been forced out of fullscreen and mouse lock
157 // mode if necessary. 163 // mode if necessary.
158 void NotifyTabOfExitIfNecessary(); 164 void NotifyTabOfExitIfNecessary();
159 void NotifyMouseLockChange(); 165 void NotifyMouseLockChange();
160 166
161 void ToggleFullscreenModeInternal(FullscreenInternalOption option); 167 void ToggleFullscreenModeInternal(FullscreenInternalOption option);
162 void EnterFullscreenModeInternal(FullscreenInternalOption option); 168 void EnterFullscreenModeInternal(FullscreenInternalOption option);
163 void ExitFullscreenModeInternal(); 169 void ExitFullscreenModeInternal();
164 void SetFullscreenedTab(content::WebContents* tab); 170 void SetFullscreenedTab(content::WebContents* tab);
165 void SetMouseLockTab(content::WebContents* tab); 171 void SetMouseLockTab(content::WebContents* tab);
172 void SetPresentationTab(content::WebContents* tab);
166 173
167 // Make the current tab exit fullscreen mode or mouse lock if it is in it. 174 // Make the current tab exit fullscreen mode or mouse lock if it is in it.
168 void ExitTabFullscreenOrMouseLockIfNecessary(); 175 void ExitTabFullscreenOrMouseLockIfNecessary();
169 void UpdateFullscreenExitBubbleContent(); 176 void UpdateFullscreenExitBubbleContent();
170 177
171 ContentSetting GetFullscreenSetting(const GURL& url) const; 178 ContentSetting GetFullscreenSetting(const GURL& url) const;
172 ContentSetting GetMouseLockSetting(const GURL& url) const; 179 ContentSetting GetMouseLockSetting(const GURL& url) const;
173 180
174 bool IsPrivilegedFullscreenForTab() const; 181 bool IsPrivilegedFullscreenForTab() const;
175 void SetPrivilegedFullscreenForTesting(bool is_privileged); 182 void SetPrivilegedFullscreenForTesting(bool is_privileged);
(...skipping 26 matching lines...) Expand all
202 // clicking the allow button on the fullscreen infobar. 209 // clicking the allow button on the fullscreen infobar.
203 bool tab_fullscreen_accepted_; 210 bool tab_fullscreen_accepted_;
204 211
205 // True if this controller has toggled into tab OR browser fullscreen. 212 // True if this controller has toggled into tab OR browser fullscreen.
206 bool toggled_into_fullscreen_; 213 bool toggled_into_fullscreen_;
207 214
208 // WebContents for current tab requesting or currently in mouse lock. 215 // WebContents for current tab requesting or currently in mouse lock.
209 // Assign using SetMouseLockTab(). 216 // Assign using SetMouseLockTab().
210 content::WebContents* mouse_lock_tab_; 217 content::WebContents* mouse_lock_tab_;
211 218
219 bool is_presentation_browser_fullscreen;
220
212 MouseLockState mouse_lock_state_; 221 MouseLockState mouse_lock_state_;
213 222
214 content::NotificationRegistrar registrar_; 223 content::NotificationRegistrar registrar_;
215 224
216 // Used to verify that calls we expect to reenter by calling 225 // Used to verify that calls we expect to reenter by calling
217 // WindowFullscreenStateChanged do so. 226 // WindowFullscreenStateChanged do so.
218 bool reentrant_window_state_change_call_check_; 227 bool reentrant_window_state_change_call_check_;
219 228
220 // Used in testing to confirm proper behavior for specific, privileged 229 // Used in testing to confirm proper behavior for specific, privileged
221 // fullscreen cases. 230 // fullscreen cases.
222 bool is_privileged_fullscreen_for_testing_; 231 bool is_privileged_fullscreen_for_testing_;
223 232
224 base::WeakPtrFactory<FullscreenController> ptr_factory_; 233 base::WeakPtrFactory<FullscreenController> ptr_factory_;
225 234
226 DISALLOW_COPY_AND_ASSIGN(FullscreenController); 235 DISALLOW_COPY_AND_ASSIGN(FullscreenController);
227 }; 236 };
228 237
229 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ 238 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/fullscreen/fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698