| 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // on a remote screen. Second, FullscreenController will auto-resize fullscreen | 47 // on a remote screen. Second, FullscreenController will auto-resize fullscreen |
| 48 // widgets to that of the capture video resolution when they are hidden (e.g., | 48 // widgets to that of the capture video resolution when they are hidden (e.g., |
| 49 // when a user has switched to another tab). This is both a performance and | 49 // when a user has switched to another tab). This is both a performance and |
| 50 // quality improvement since scaling and letterboxing steps can be skipped in | 50 // quality improvement since scaling and letterboxing steps can be skipped in |
| 51 // the capture pipeline. | 51 // the capture pipeline. |
| 52 | 52 |
| 53 // This class implements fullscreen and mouselock behaviour. | 53 // This class implements fullscreen and mouselock behaviour. |
| 54 class FullscreenController : public content::NotificationObserver { | 54 class FullscreenController : public content::NotificationObserver { |
| 55 public: | 55 public: |
| 56 explicit FullscreenController(Browser* browser); | 56 explicit FullscreenController(Browser* browser); |
| 57 virtual ~FullscreenController(); | 57 ~FullscreenController() override; |
| 58 | 58 |
| 59 // Browser/User Fullscreen /////////////////////////////////////////////////// | 59 // Browser/User Fullscreen /////////////////////////////////////////////////// |
| 60 | 60 |
| 61 // Returns true if the window is currently fullscreen and was initially | 61 // Returns true if the window is currently fullscreen and was initially |
| 62 // transitioned to fullscreen by a browser (i.e., not tab-initiated) mode | 62 // transitioned to fullscreen by a browser (i.e., not tab-initiated) mode |
| 63 // transition. | 63 // transition. |
| 64 bool IsFullscreenForBrowser() const; | 64 bool IsFullscreenForBrowser() const; |
| 65 | 65 |
| 66 void ToggleBrowserFullscreenMode(); | 66 void ToggleBrowserFullscreenMode(); |
| 67 | 67 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 // Called by platform FullscreenExitBubble. | 137 // Called by platform FullscreenExitBubble. |
| 138 void ExitTabOrBrowserFullscreenToPreviousState(); | 138 void ExitTabOrBrowserFullscreenToPreviousState(); |
| 139 void OnAcceptFullscreenPermission(); | 139 void OnAcceptFullscreenPermission(); |
| 140 void OnDenyFullscreenPermission(); | 140 void OnDenyFullscreenPermission(); |
| 141 | 141 |
| 142 // Called by Browser::LostMouseLock. | 142 // Called by Browser::LostMouseLock. |
| 143 void LostMouseLock(); | 143 void LostMouseLock(); |
| 144 | 144 |
| 145 // content::NotificationObserver: | 145 // content::NotificationObserver: |
| 146 virtual void Observe(int type, | 146 void Observe(int type, |
| 147 const content::NotificationSource& source, | 147 const content::NotificationSource& source, |
| 148 const content::NotificationDetails& details) override; | 148 const content::NotificationDetails& details) override; |
| 149 | 149 |
| 150 // Bubble Content //////////////////////////////////////////////////////////// | 150 // Bubble Content //////////////////////////////////////////////////////////// |
| 151 | 151 |
| 152 GURL GetFullscreenExitBubbleURL() const; | 152 GURL GetFullscreenExitBubbleURL() const; |
| 153 FullscreenExitBubbleType GetFullscreenExitBubbleType() const; | 153 FullscreenExitBubbleType GetFullscreenExitBubbleType() const; |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 friend class FullscreenControllerTest; | 156 friend class FullscreenControllerTest; |
| 157 | 157 |
| 158 enum MouseLockState { | 158 enum MouseLockState { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // Used in testing to confirm proper behavior for specific, privileged | 255 // Used in testing to confirm proper behavior for specific, privileged |
| 256 // fullscreen cases. | 256 // fullscreen cases. |
| 257 bool is_privileged_fullscreen_for_testing_; | 257 bool is_privileged_fullscreen_for_testing_; |
| 258 | 258 |
| 259 base::WeakPtrFactory<FullscreenController> ptr_factory_; | 259 base::WeakPtrFactory<FullscreenController> ptr_factory_; |
| 260 | 260 |
| 261 DISALLOW_COPY_AND_ASSIGN(FullscreenController); | 261 DISALLOW_COPY_AND_ASSIGN(FullscreenController); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ | 264 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_CONTROLLER_H_ |
| OLD | NEW |