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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // transitioned to fullscreen by a browser (vs tab) mode transition. | 44 // transitioned to fullscreen by a browser (vs tab) mode transition. |
45 bool IsFullscreenForBrowser() const; | 45 bool IsFullscreenForBrowser() const; |
46 | 46 |
47 // Returns true if fullscreen has been caused by a tab. | 47 // Returns true if fullscreen has been caused by a tab. |
48 // The window may still be transitioning, and window_->IsFullscreen() | 48 // The window may still be transitioning, and window_->IsFullscreen() |
49 // may still return false. | 49 // may still return false. |
50 bool IsFullscreenForTabOrPending() const; | 50 bool IsFullscreenForTabOrPending() const; |
51 bool IsFullscreenForTabOrPending( | 51 bool IsFullscreenForTabOrPending( |
52 const content::WebContents* web_contents) const; | 52 const content::WebContents* web_contents) const; |
53 | 53 |
| 54 #if defined(OS_WIN) |
| 55 // Returns whether we are currently in a Metro snap view. |
| 56 bool IsInMetroSnapMode(); |
| 57 #endif |
| 58 |
54 bool IsMouseLockRequested() const; | 59 bool IsMouseLockRequested() const; |
55 bool IsMouseLocked() const; | 60 bool IsMouseLocked() const; |
56 | 61 |
57 // Requests. | 62 // Requests. |
58 void RequestToLockMouse(content::WebContents* web_contents, | 63 void RequestToLockMouse(content::WebContents* web_contents, |
59 bool user_gesture, | 64 bool user_gesture, |
60 bool last_unlocked_by_target); | 65 bool last_unlocked_by_target); |
61 void ToggleFullscreenModeForTab(content::WebContents* web_contents, | 66 void ToggleFullscreenModeForTab(content::WebContents* web_contents, |
62 bool enter_fullscreen); | 67 bool enter_fullscreen); |
| 68 #if defined(OS_WIN) |
| 69 // API that puts the window into a mode suitable for rendering when Chrome |
| 70 // is rendered in a 20% screen-width Metro snap view on Windows 8. |
| 71 void SetMetroSnapMode(bool enable); |
| 72 #endif |
63 #if defined(OS_MACOSX) | 73 #if defined(OS_MACOSX) |
64 void TogglePresentationMode(); | 74 void TogglePresentationMode(); |
65 #endif | 75 #endif |
66 void ToggleFullscreenMode(); | 76 void ToggleFullscreenMode(); |
67 // Extension API implementation uses this method to toggle fullscreen mode. | 77 // 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 | 78 // The extension's name is displayed in the full screen bubble UI to attribute |
69 // the cause of the full screen state change. | 79 // the cause of the full screen state change. |
70 void ToggleFullscreenModeWithExtension(const GURL& extension_url); | 80 void ToggleFullscreenModeWithExtension(const GURL& extension_url); |
71 | 81 |
72 // Notifications. | 82 // Notifications. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 147 |
138 // TabContents for current tab requesting or currently in mouse lock. | 148 // TabContents for current tab requesting or currently in mouse lock. |
139 TabContents* mouse_lock_tab_; | 149 TabContents* mouse_lock_tab_; |
140 | 150 |
141 MouseLockState mouse_lock_state_; | 151 MouseLockState mouse_lock_state_; |
142 | 152 |
143 DISALLOW_COPY_AND_ASSIGN(FullscreenController); | 153 DISALLOW_COPY_AND_ASSIGN(FullscreenController); |
144 }; | 154 }; |
145 | 155 |
146 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ | 156 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ |
OLD | NEW |