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

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

Issue 235923003: <webview>: Move download permission to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_media_to_chrome
Patch Set: Merge with ToT 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 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,
88 const GURL& url,
89 const base::Callback<void(bool)>& callback) OVERRIDE;
87 90
88 // NotificationObserver implementation. 91 // NotificationObserver implementation.
89 virtual void Observe(int type, 92 virtual void Observe(int type,
90 const content::NotificationSource& source, 93 const content::NotificationSource& source,
91 const content::NotificationDetails& details) OVERRIDE; 94 const content::NotificationDetails& details) OVERRIDE;
92 95
93 // Set the zoom factor. 96 // Set the zoom factor.
94 virtual void SetZoom(double zoom_factor) OVERRIDE; 97 virtual void SetZoom(double zoom_factor) OVERRIDE;
95 98
96 // Returns the current zoom factor. 99 // Returns the current zoom factor.
(...skipping 28 matching lines...) Expand all
125 const std::string& user_input); 128 const std::string& user_input);
126 129
127 void CancelGeolocationPermissionRequest(int bridge_id); 130 void CancelGeolocationPermissionRequest(int bridge_id);
128 131
129 void OnWebViewMediaPermissionResponse( 132 void OnWebViewMediaPermissionResponse(
130 const content::MediaStreamRequest& request, 133 const content::MediaStreamRequest& request,
131 const content::MediaResponseCallback& callback, 134 const content::MediaResponseCallback& callback,
132 bool allow, 135 bool allow,
133 const std::string& user_input); 136 const std::string& user_input);
134 137
138 void OnWebViewDownloadPermissionResponse(
139 const base::Callback<void(bool)>& callback,
140 bool allow,
141 const std::string& user_input);
142
135 enum PermissionResponseAction { 143 enum PermissionResponseAction {
136 DENY, 144 DENY,
137 ALLOW, 145 ALLOW,
138 DEFAULT 146 DEFAULT
139 }; 147 };
140 148
141 enum SetPermissionResult { 149 enum SetPermissionResult {
142 SET_PERMISSION_INVALID, 150 SET_PERMISSION_INVALID,
143 SET_PERMISSION_ALLOWED, 151 SET_PERMISSION_ALLOWED,
144 SET_PERMISSION_DENIED 152 SET_PERMISSION_DENIED
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 scoped_ptr<chromeos::AccessibilityStatusSubscription> 302 scoped_ptr<chromeos::AccessibilityStatusSubscription>
295 accessibility_subscription_; 303 accessibility_subscription_;
296 #endif 304 #endif
297 305
298 std::map<int, int> bridge_id_to_request_id_map_; 306 std::map<int, int> bridge_id_to_request_id_map_;
299 307
300 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); 308 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
301 }; 309 };
302 310
303 #endif // CHROME_BROWSER_GUESTVIEW_WEBVIEW_WEBVIEW_GUEST_H_ 311 #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