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 23 matching lines...) Expand all Loading... | |
34 | 34 |
35 // This class implements fullscreen and mouselock behaviour. | 35 // This class implements fullscreen and mouselock behaviour. |
36 class FullscreenController : public base::RefCounted<FullscreenController> { | 36 class FullscreenController : public base::RefCounted<FullscreenController> { |
37 public: | 37 public: |
38 FullscreenController(BrowserWindow* window, | 38 FullscreenController(BrowserWindow* window, |
39 Profile* profile, | 39 Profile* profile, |
40 Browser* browser); | 40 Browser* browser); |
41 virtual ~FullscreenController(); | 41 virtual ~FullscreenController(); |
42 | 42 |
43 // Querying. | 43 // Querying. |
44 bool IsFullscreenForTab() const; | 44 // Returns true if the window is currently fullscreen and was initially |
45 bool IsFullscreenForTab(const content::WebContents* tab) const; | 45 // transitioned to fullscreen by a browser (vs tab) mode transition. |
46 bool IsFullscreenForBrowser() const; | |
sky
2012/03/22 22:48:10
Add some whitespace between methods to make it mor
scheib
2012/03/26 23:30:46
Done.
| |
47 // Returns true if fullscreen has been caused by a tab. | |
48 // The window may still be transitioning, and window_->IsFullscreen() | |
49 // may still return false. | |
50 bool IsFullscreenForTabOrPending() const; | |
46 bool IsFullscreenForTabOrPending(const content::WebContents* tab) const; | 51 bool IsFullscreenForTabOrPending(const content::WebContents* tab) const; |
52 // Returns true if the mouse has been locked or a lock request is pending | |
53 // user confirmation. | |
54 bool IsMouseLockedOrPending() const; | |
47 | 55 |
48 // Requests. | 56 // Requests. |
49 void RequestToLockMouse(content::WebContents* tab); | 57 void RequestToLockMouse(content::WebContents* tab); |
50 void ToggleFullscreenModeForTab(content::WebContents* tab, | 58 void ToggleFullscreenModeForTab(content::WebContents* tab, |
51 bool enter_fullscreen); | 59 bool enter_fullscreen); |
52 #if defined(OS_MACOSX) | 60 #if defined(OS_MACOSX) |
53 void TogglePresentationMode(); | 61 void TogglePresentationMode(); |
54 #endif | 62 #endif |
55 void ToggleFullscreenMode(); | 63 void ToggleFullscreenMode(); |
56 // Extension API implementation uses this method to toggle fullscreen mode. | 64 // Extension API implementation uses this method to toggle fullscreen mode. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 // True if tab fullscreen has been allowed, either by settings or by user | 120 // True if tab fullscreen has been allowed, either by settings or by user |
113 // clicking the allow button on the fullscreen infobar. | 121 // clicking the allow button on the fullscreen infobar. |
114 bool tab_fullscreen_accepted_; | 122 bool tab_fullscreen_accepted_; |
115 | 123 |
116 MouseLockState mouse_lock_state_; | 124 MouseLockState mouse_lock_state_; |
117 | 125 |
118 DISALLOW_COPY_AND_ASSIGN(FullscreenController); | 126 DISALLOW_COPY_AND_ASSIGN(FullscreenController); |
119 }; | 127 }; |
120 | 128 |
121 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ | 129 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ |
OLD | NEW |