OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
6 | 6 |
| 7 #include "components/guest_view/browser/guest_view_event.h" |
7 #include "content/public/browser/render_process_host.h" | 8 #include "content/public/browser/render_process_host.h" |
8 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
9 #include "content/public/browser/user_metrics.h" | 10 #include "content/public/browser/user_metrics.h" |
10 #include "extensions/browser/api/extensions_api_client.h" | 11 #include "extensions/browser/api/extensions_api_client.h" |
11 #include "extensions/browser/guest_view/guest_view_event.h" | |
12 #include "extensions/browser/guest_view/web_view/web_view_constants.h" | 12 #include "extensions/browser/guest_view/web_view/web_view_constants.h" |
13 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 13 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
14 #include "extensions/browser/guest_view/web_view/web_view_permission_helper_dele
gate.h" | 14 #include "extensions/browser/guest_view/web_view/web_view_permission_helper_dele
gate.h" |
15 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" | 15 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" |
16 | 16 |
17 using content::BrowserPluginGuestDelegate; | 17 using content::BrowserPluginGuestDelegate; |
18 using content::RenderViewHost; | 18 using content::RenderViewHost; |
| 19 using guestview::GuestViewEvent; |
19 | 20 |
20 namespace extensions { | 21 namespace extensions { |
21 | 22 |
22 namespace { | 23 namespace { |
23 static std::string PermissionTypeToString(WebViewPermissionType type) { | 24 static std::string PermissionTypeToString(WebViewPermissionType type) { |
24 switch (type) { | 25 switch (type) { |
25 case WEB_VIEW_PERMISSION_TYPE_DOWNLOAD: | 26 case WEB_VIEW_PERMISSION_TYPE_DOWNLOAD: |
26 return webview::kPermissionTypeDownload; | 27 return webview::kPermissionTypeDownload; |
27 case WEB_VIEW_PERMISSION_TYPE_FILESYSTEM: | 28 case WEB_VIEW_PERMISSION_TYPE_FILESYSTEM: |
28 return webview::kPermissionTypeFileSystem; | 29 return webview::kPermissionTypeFileSystem; |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 bool allowed_by_default) | 398 bool allowed_by_default) |
398 : callback(callback), | 399 : callback(callback), |
399 permission_type(permission_type), | 400 permission_type(permission_type), |
400 allowed_by_default(allowed_by_default) { | 401 allowed_by_default(allowed_by_default) { |
401 } | 402 } |
402 | 403 |
403 WebViewPermissionHelper::PermissionResponseInfo::~PermissionResponseInfo() { | 404 WebViewPermissionHelper::PermissionResponseInfo::~PermissionResponseInfo() { |
404 } | 405 } |
405 | 406 |
406 } // namespace extensions | 407 } // namespace extensions |
OLD | NEW |