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

Side by Side Diff: chrome/browser/guestview/webview/webview_guest.h

Issue 239113007: <webview>: Move pointerLock permission to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_downloads_to_chrome
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 5 #ifndef CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 6 #define CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "chrome/browser/extensions/tab_helper.h" 9 #include "chrome/browser/extensions/tab_helper.h"
10 #include "chrome/browser/guestview/guestview.h" 10 #include "chrome/browser/guestview/guestview.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool allowed_by_default) OVERRIDE; 80 bool allowed_by_default) OVERRIDE;
81 virtual GURL ResolveURL(const std::string& src) OVERRIDE; 81 virtual GURL ResolveURL(const std::string& src) OVERRIDE;
82 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size) 82 virtual void SizeChanged(const gfx::Size& old_size, const gfx::Size& new_size)
83 OVERRIDE; 83 OVERRIDE;
84 virtual void RequestMediaAccessPermission( 84 virtual void RequestMediaAccessPermission(
85 const content::MediaStreamRequest& request, 85 const content::MediaStreamRequest& request,
86 const content::MediaResponseCallback& callback) OVERRIDE; 86 const content::MediaResponseCallback& callback) OVERRIDE;
87 virtual void CanDownload(const std::string& request_method, 87 virtual void CanDownload(const std::string& request_method,
88 const GURL& url, 88 const GURL& url,
89 const base::Callback<void(bool)>& callback) OVERRIDE; 89 const base::Callback<void(bool)>& callback) OVERRIDE;
90 virtual void RequestPointerLockPermission(
91 bool user_gesture,
92 bool last_unlocked_by_target,
93 const base::Callback<void(bool)>& callback) OVERRIDE;
90 94
91 // NotificationObserver implementation. 95 // NotificationObserver implementation.
92 virtual void Observe(int type, 96 virtual void Observe(int type,
93 const content::NotificationSource& source, 97 const content::NotificationSource& source,
94 const content::NotificationDetails& details) OVERRIDE; 98 const content::NotificationDetails& details) OVERRIDE;
95 99
96 // Set the zoom factor. 100 // Set the zoom factor.
97 virtual void SetZoom(double zoom_factor) OVERRIDE; 101 virtual void SetZoom(double zoom_factor) OVERRIDE;
98 102
99 // Returns the current zoom factor. 103 // Returns the current zoom factor.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 const content::MediaStreamRequest& request, 137 const content::MediaStreamRequest& request,
134 const content::MediaResponseCallback& callback, 138 const content::MediaResponseCallback& callback,
135 bool allow, 139 bool allow,
136 const std::string& user_input); 140 const std::string& user_input);
137 141
138 void OnWebViewDownloadPermissionResponse( 142 void OnWebViewDownloadPermissionResponse(
139 const base::Callback<void(bool)>& callback, 143 const base::Callback<void(bool)>& callback,
140 bool allow, 144 bool allow,
141 const std::string& user_input); 145 const std::string& user_input);
142 146
147 void OnWebViewPointerLockPermissionResponse(
148 const base::Callback<void(bool)>& callback,
149 bool allow,
150 const std::string& user_input);
151
143 enum PermissionResponseAction { 152 enum PermissionResponseAction {
144 DENY, 153 DENY,
145 ALLOW, 154 ALLOW,
146 DEFAULT 155 DEFAULT
147 }; 156 };
148 157
149 enum SetPermissionResult { 158 enum SetPermissionResult {
150 SET_PERMISSION_INVALID, 159 SET_PERMISSION_INVALID,
151 SET_PERMISSION_ALLOWED, 160 SET_PERMISSION_ALLOWED,
152 SET_PERMISSION_DENIED 161 SET_PERMISSION_DENIED
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 scoped_ptr<chromeos::AccessibilityStatusSubscription> 311 scoped_ptr<chromeos::AccessibilityStatusSubscription>
303 accessibility_subscription_; 312 accessibility_subscription_;
304 #endif 313 #endif
305 314
306 std::map<int, int> bridge_id_to_request_id_map_; 315 std::map<int, int> bridge_id_to_request_id_map_;
307 316
308 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 317 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
309 }; 318 };
310 319
311 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 320 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/guestview/webview/webview_constants.cc ('k') | chrome/browser/guestview/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698