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 bool IsFullscreenForBrowser() const; |
45 bool IsFullscreenForTab(const content::WebContents* tab) const; | 45 bool IsFullscreenForTabOrPending() const; |
yzshen1
2012/03/16 07:33:28
Nit: Would you please add a comment about what 'pe
scheib
2012/03/16 21:20:03
Done.
| |
46 bool IsFullscreenForTabOrPending(const content::WebContents* tab) const; | 46 bool IsFullscreenForTabOrPending(const content::WebContents* tab) const; |
47 bool IsMouseLockedOrPending() const; | |
47 | 48 |
48 // Requests. | 49 // Requests. |
49 void RequestToLockMouse(content::WebContents* tab); | 50 void RequestToLockMouse(content::WebContents* tab); |
50 void ToggleFullscreenModeForTab(content::WebContents* tab, | 51 void ToggleFullscreenModeForTab(content::WebContents* tab, |
51 bool enter_fullscreen); | 52 bool enter_fullscreen); |
52 #if defined(OS_MACOSX) | 53 #if defined(OS_MACOSX) |
53 void TogglePresentationMode(); | 54 void TogglePresentationMode(); |
54 #endif | 55 #endif |
55 void ToggleFullscreenMode(); | 56 void ToggleFullscreenMode(); |
56 // Extension API implementation uses this method to toggle fullscreen mode. | 57 // 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 | 113 // True if tab fullscreen has been allowed, either by settings or by user |
113 // clicking the allow button on the fullscreen infobar. | 114 // clicking the allow button on the fullscreen infobar. |
114 bool tab_fullscreen_accepted_; | 115 bool tab_fullscreen_accepted_; |
115 | 116 |
116 MouseLockState mouse_lock_state_; | 117 MouseLockState mouse_lock_state_; |
117 | 118 |
118 DISALLOW_COPY_AND_ASSIGN(FullscreenController); | 119 DISALLOW_COPY_AND_ASSIGN(FullscreenController); |
119 }; | 120 }; |
120 | 121 |
121 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ | 122 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ |
OLD | NEW |