Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 // Returns whether we are currently in a Metro snap view. | 67 // Returns whether we are currently in a Metro snap view. |
| 68 bool IsInMetroSnapMode(); | 68 bool IsInMetroSnapMode(); |
| 69 | 69 |
| 70 #if defined(OS_WIN) | 70 #if defined(OS_WIN) |
| 71 // API that puts the window into a mode suitable for rendering when Chrome | 71 // API that puts the window into a mode suitable for rendering when Chrome |
| 72 // is rendered in a 20% screen-width Metro snap view on Windows 8. | 72 // is rendered in a 20% screen-width Metro snap view on Windows 8. |
| 73 void SetMetroSnapMode(bool enable); | 73 void SetMetroSnapMode(bool enable); |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 #if defined(OS_MACOSX) | 76 #if defined(OS_MACOSX) |
| 77 void TogglePresentationMode(); | 77 void ToggleFullscreenWithChrome(); |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 // Mouse Lock //////////////////////////////////////////////////////////////// | 80 // Mouse Lock //////////////////////////////////////////////////////////////// |
| 81 | 81 |
| 82 bool IsMouseLockRequested() const; | 82 bool IsMouseLockRequested() const; |
| 83 bool IsMouseLocked() const; | 83 bool IsMouseLocked() const; |
| 84 | 84 |
| 85 void RequestToLockMouse(content::WebContents* web_contents, | 85 void RequestToLockMouse(content::WebContents* web_contents, |
| 86 bool user_gesture, | 86 bool user_gesture, |
| 87 bool last_unlocked_by_target); | 87 bool last_unlocked_by_target); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 // Posts a task to call NotifyFullscreenChange. | 135 // Posts a task to call NotifyFullscreenChange. |
| 136 void PostFullscreenChangeNotification(bool is_fullscreen); | 136 void PostFullscreenChangeNotification(bool is_fullscreen); |
| 137 // Sends a NOTIFICATION_FULLSCREEN_CHANGED notification. | 137 // Sends a NOTIFICATION_FULLSCREEN_CHANGED notification. |
| 138 void NotifyFullscreenChange(bool is_fullscreen); | 138 void NotifyFullscreenChange(bool is_fullscreen); |
| 139 // Notifies the tab that it has been forced out of fullscreen and mouse lock | 139 // Notifies the tab that it has been forced out of fullscreen and mouse lock |
| 140 // mode if necessary. | 140 // mode if necessary. |
| 141 void NotifyTabOfExitIfNecessary(); | 141 void NotifyTabOfExitIfNecessary(); |
| 142 void NotifyMouseLockChange(); | 142 void NotifyMouseLockChange(); |
| 143 | 143 |
| 144 // TODO(koz): Change |for_tab| to an enum. | 144 // TODO(koz): Change |for_tab| to an enum. |
| 145 void ToggleFullscreenModeInternal(bool for_tab); | 145 void ToggleFullscreenModeInternal(bool for_tab, bool with_chrome); |
|
Robert Sesek
2013/01/28 19:46:22
Since there's already a TODO about using an enum,
scheib
2013/01/28 20:40:02
Done.
| |
| 146 #if defined(OS_MACOSX) | 146 void EnterFullscreenModeInternal(bool for_tab, bool with_chrome); |
| 147 void TogglePresentationModeInternal(bool for_tab); | 147 void ExitFullscreenModeInternal(); |
| 148 #endif | |
| 149 void SetFullscreenedTab(content::WebContents* tab); | 148 void SetFullscreenedTab(content::WebContents* tab); |
| 150 void SetMouseLockTab(content::WebContents* tab); | 149 void SetMouseLockTab(content::WebContents* tab); |
| 151 | 150 |
| 152 // Make the current tab exit fullscreen mode or mouse lock if it is in it. | 151 // Make the current tab exit fullscreen mode or mouse lock if it is in it. |
| 153 void ExitTabFullscreenOrMouseLockIfNecessary(); | 152 void ExitTabFullscreenOrMouseLockIfNecessary(); |
| 154 void UpdateFullscreenExitBubbleContent(); | 153 void UpdateFullscreenExitBubbleContent(); |
| 155 | 154 |
| 156 ContentSetting GetFullscreenSetting(const GURL& url) const; | 155 ContentSetting GetFullscreenSetting(const GURL& url) const; |
| 157 ContentSetting GetMouseLockSetting(const GURL& url) const; | 156 ContentSetting GetMouseLockSetting(const GURL& url) const; |
| 158 | 157 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 188 content::NotificationRegistrar registrar_; | 187 content::NotificationRegistrar registrar_; |
| 189 | 188 |
| 190 // Used to verify that calls we expect to reenter by calling | 189 // Used to verify that calls we expect to reenter by calling |
| 191 // WindowFullscreenStateChanged do so. | 190 // WindowFullscreenStateChanged do so. |
| 192 bool reentrant_window_state_change_call_check_; | 191 bool reentrant_window_state_change_call_check_; |
| 193 | 192 |
| 194 DISALLOW_COPY_AND_ASSIGN(FullscreenController); | 193 DISALLOW_COPY_AND_ASSIGN(FullscreenController); |
| 195 }; | 194 }; |
| 196 | 195 |
| 197 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ | 196 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ |
| OLD | NEW |