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

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

Issue 235733002: <webview>: Move media request to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_geolocation_to_chrome
Patch Set: Fixed rebase 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
« no previous file with comments | « no previous file | chrome/browser/guestview/webview/webview_guest.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 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual void RendererResponsive() OVERRIDE; 74 virtual void RendererResponsive() OVERRIDE;
75 virtual void RendererUnresponsive() OVERRIDE; 75 virtual void RendererUnresponsive() OVERRIDE;
76 virtual void RequestPermission( 76 virtual void RequestPermission(
77 BrowserPluginPermissionType permission_type, 77 BrowserPluginPermissionType permission_type,
78 const base::DictionaryValue& request_info, 78 const base::DictionaryValue& request_info,
79 const PermissionResponseCallback& callback, 79 const PermissionResponseCallback& callback,
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(
85 const content::MediaStreamRequest& request,
86 const content::MediaResponseCallback& callback) OVERRIDE;
84 87
85 // NotificationObserver implementation. 88 // NotificationObserver implementation.
86 virtual void Observe(int type, 89 virtual void Observe(int type,
87 const content::NotificationSource& source, 90 const content::NotificationSource& source,
88 const content::NotificationDetails& details) OVERRIDE; 91 const content::NotificationDetails& details) OVERRIDE;
89 92
90 // Set the zoom factor. 93 // Set the zoom factor.
91 virtual void SetZoom(double zoom_factor) OVERRIDE; 94 virtual void SetZoom(double zoom_factor) OVERRIDE;
92 95
93 // Returns the current zoom factor. 96 // Returns the current zoom factor.
(...skipping 22 matching lines...) Expand all
116 119
117 void OnWebViewGeolocationPermissionResponse( 120 void OnWebViewGeolocationPermissionResponse(
118 int bridge_id, 121 int bridge_id,
119 bool user_gesture, 122 bool user_gesture,
120 const base::Callback<void(bool)>& callback, 123 const base::Callback<void(bool)>& callback,
121 bool allow, 124 bool allow,
122 const std::string& user_input); 125 const std::string& user_input);
123 126
124 void CancelGeolocationPermissionRequest(int bridge_id); 127 void CancelGeolocationPermissionRequest(int bridge_id);
125 128
129 void OnWebViewMediaPermissionResponse(
130 const content::MediaStreamRequest& request,
131 const content::MediaResponseCallback& callback,
132 bool allow,
133 const std::string& user_input);
134
126 enum PermissionResponseAction { 135 enum PermissionResponseAction {
127 DENY, 136 DENY,
128 ALLOW, 137 ALLOW,
129 DEFAULT 138 DEFAULT
130 }; 139 };
131 140
132 enum SetPermissionResult { 141 enum SetPermissionResult {
133 SET_PERMISSION_INVALID, 142 SET_PERMISSION_INVALID,
134 SET_PERMISSION_ALLOWED, 143 SET_PERMISSION_ALLOWED,
135 SET_PERMISSION_DENIED 144 SET_PERMISSION_DENIED
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 scoped_ptr<chromeos::AccessibilityStatusSubscription> 294 scoped_ptr<chromeos::AccessibilityStatusSubscription>
286 accessibility_subscription_; 295 accessibility_subscription_;
287 #endif 296 #endif
288 297
289 std::map<int, int> bridge_id_to_request_id_map_; 298 std::map<int, int> bridge_id_to_request_id_map_;
290 299
291 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 300 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
292 }; 301 };
293 302
294 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 303 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/guestview/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698