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 | |
59 bool IsMouseLockRequested() const; | 54 bool IsMouseLockRequested() const; |
60 bool IsMouseLocked() const; | 55 bool IsMouseLocked() const; |
61 | 56 |
62 // Requests. | 57 // Requests. |
63 void RequestToLockMouse(content::WebContents* web_contents, | 58 void RequestToLockMouse(content::WebContents* web_contents, |
64 bool user_gesture, | 59 bool user_gesture, |
65 bool last_unlocked_by_target); | 60 bool last_unlocked_by_target); |
66 void ToggleFullscreenModeForTab(content::WebContents* web_contents, | 61 void ToggleFullscreenModeForTab(content::WebContents* web_contents, |
67 bool enter_fullscreen); | 62 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 | |
73 #if defined(OS_MACOSX) | 63 #if defined(OS_MACOSX) |
74 void TogglePresentationMode(); | 64 void TogglePresentationMode(); |
75 #endif | 65 #endif |
76 void ToggleFullscreenMode(); | 66 void ToggleFullscreenMode(); |
77 // Extension API implementation uses this method to toggle fullscreen mode. | 67 // Extension API implementation uses this method to toggle fullscreen mode. |
78 // The extension's name is displayed in the full screen bubble UI to attribute | 68 // The extension's name is displayed in the full screen bubble UI to attribute |
79 // the cause of the full screen state change. | 69 // the cause of the full screen state change. |
80 void ToggleFullscreenModeWithExtension(const GURL& extension_url); | 70 void ToggleFullscreenModeWithExtension(const GURL& extension_url); |
81 | 71 |
82 // Notifications. | 72 // Notifications. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 137 |
148 // TabContents for current tab requesting or currently in mouse lock. | 138 // TabContents for current tab requesting or currently in mouse lock. |
149 TabContents* mouse_lock_tab_; | 139 TabContents* mouse_lock_tab_; |
150 | 140 |
151 MouseLockState mouse_lock_state_; | 141 MouseLockState mouse_lock_state_; |
152 | 142 |
153 DISALLOW_COPY_AND_ASSIGN(FullscreenController); | 143 DISALLOW_COPY_AND_ASSIGN(FullscreenController); |
154 }; | 144 }; |
155 | 145 |
156 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ | 146 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ |
OLD | NEW |