Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/ui/fullscreen_controller.h

Issue 10443045: Silent mouse lock after unlock by target (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit changes Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/fullscreen_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(const content::WebContents* tab) const; 51 bool IsFullscreenForTabOrPending(const content::WebContents* tab) const;
52 52
53 bool IsMouseLockRequested() const; 53 bool IsMouseLockRequested() const;
54 bool IsMouseLocked() const; 54 bool IsMouseLocked() const;
55 55
56 // Requests. 56 // Requests.
57 void RequestToLockMouse(content::WebContents* tab, bool user_gesture); 57 void RequestToLockMouse(content::WebContents* tab,
58 bool user_gesture,
59 bool last_unlocked_by_target);
58 void ToggleFullscreenModeForTab(content::WebContents* tab, 60 void ToggleFullscreenModeForTab(content::WebContents* tab,
59 bool enter_fullscreen); 61 bool enter_fullscreen);
60 #if defined(OS_MACOSX) 62 #if defined(OS_MACOSX)
61 void TogglePresentationMode(); 63 void TogglePresentationMode();
62 #endif 64 #endif
63 void ToggleFullscreenMode(); 65 void ToggleFullscreenMode();
64 // Extension API implementation uses this method to toggle fullscreen mode. 66 // Extension API implementation uses this method to toggle fullscreen mode.
65 // The extension's name is displayed in the full screen bubble UI to attribute 67 // The extension's name is displayed in the full screen bubble UI to attribute
66 // the cause of the full screen state change. 68 // the cause of the full screen state change.
67 void ToggleFullscreenModeWithExtension(const GURL& extension_url); 69 void ToggleFullscreenModeWithExtension(const GURL& extension_url);
(...skipping 12 matching lines...) Expand all
80 82
81 private: 83 private:
82 friend class base::RefCounted<FullscreenController>; 84 friend class base::RefCounted<FullscreenController>;
83 85
84 enum MouseLockState { 86 enum MouseLockState {
85 MOUSELOCK_NOT_REQUESTED, 87 MOUSELOCK_NOT_REQUESTED,
86 // The page requests to lock the mouse and the user hasn't responded to the 88 // The page requests to lock the mouse and the user hasn't responded to the
87 // request. 89 // request.
88 MOUSELOCK_REQUESTED, 90 MOUSELOCK_REQUESTED,
89 // Mouse lock has been allowed by the user. 91 // Mouse lock has been allowed by the user.
90 MOUSELOCK_ACCEPTED 92 MOUSELOCK_ACCEPTED,
93 // Mouse lock has been silently accepted, no notification to user.
94 MOUSELOCK_ACCEPTED_SILENTLY
91 }; 95 };
92 96
93 virtual ~FullscreenController(); 97 virtual ~FullscreenController();
94 98
95 // Notifies the tab that it has been forced out of fullscreen and mouse lock 99 // Notifies the tab that it has been forced out of fullscreen and mouse lock
96 // mode if necessary. 100 // mode if necessary.
97 void NotifyTabOfExitIfNecessary(); 101 void NotifyTabOfExitIfNecessary();
98 102
99 // Make the current tab exit fullscreen mode or mouse lock if it is in it. 103 // Make the current tab exit fullscreen mode or mouse lock if it is in it.
100 void ExitTabFullscreenOrMouseLockIfNecessary(); 104 void ExitTabFullscreenOrMouseLockIfNecessary();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 136
133 // Wrapper for current tab requesting or currently in mouse lock. 137 // Wrapper for current tab requesting or currently in mouse lock.
134 TabContentsWrapper* mouse_lock_tab_; 138 TabContentsWrapper* mouse_lock_tab_;
135 139
136 MouseLockState mouse_lock_state_; 140 MouseLockState mouse_lock_state_;
137 141
138 DISALLOW_COPY_AND_ASSIGN(FullscreenController); 142 DISALLOW_COPY_AND_ASSIGN(FullscreenController);
139 }; 143 };
140 144
141 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_ 145 #endif // CHROME_BROWSER_UI_FULLSCREEN_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698