OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |