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

Side by Side Diff: chrome/browser/guest_view/web_view/web_view_permission_helper.cc

Issue 464533002: Move guest_view to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small changes are made in guest_view_manager_unittest.cc Created 6 years, 4 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 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 "chrome/browser/guest_view/web_view/web_view_permission_helper.h" 5 #include "chrome/browser/guest_view/web_view/web_view_permission_helper.h"
6 6
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
8 #include "chrome/browser/geolocation/geolocation_permission_context.h" 8 #include "chrome/browser/geolocation/geolocation_permission_context.h"
9 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" 9 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h"
10 #include "chrome/browser/guest_view/web_view/web_view_constants.h" 10 #include "chrome/browser/guest_view/web_view/web_view_constants.h"
11 #include "chrome/browser/guest_view/web_view/web_view_guest.h" 11 #include "chrome/browser/guest_view/web_view/web_view_guest.h"
12 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h" 12 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h"
13 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 13 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/common/render_messages.h" 15 #include "chrome/common/render_messages.h"
16 #include "content/public/browser/render_process_host.h" 16 #include "content/public/browser/render_process_host.h"
17 #include "content/public/browser/render_view_host.h" 17 #include "content/public/browser/render_view_host.h"
18 #include "content/public/browser/user_metrics.h" 18 #include "content/public/browser/user_metrics.h"
19 19
20 using content::BrowserPluginGuestDelegate; 20 using content::BrowserPluginGuestDelegate;
21 using content::RenderViewHost; 21 using content::RenderViewHost;
22 22
23 namespace extensions {
24
23 namespace { 25 namespace {
24 static std::string PermissionTypeToString(WebViewPermissionType type) { 26 static std::string PermissionTypeToString(WebViewPermissionType type) {
25 switch (type) { 27 switch (type) {
26 case WEB_VIEW_PERMISSION_TYPE_DOWNLOAD: 28 case WEB_VIEW_PERMISSION_TYPE_DOWNLOAD:
27 return webview::kPermissionTypeDownload; 29 return webview::kPermissionTypeDownload;
28 case WEB_VIEW_PERMISSION_TYPE_FILESYSTEM: 30 case WEB_VIEW_PERMISSION_TYPE_FILESYSTEM:
29 return webview::kPermissionTypeFileSystem; 31 return webview::kPermissionTypeFileSystem;
30 case WEB_VIEW_PERMISSION_TYPE_GEOLOCATION: 32 case WEB_VIEW_PERMISSION_TYPE_GEOLOCATION:
31 return webview::kPermissionTypeGeolocation; 33 return webview::kPermissionTypeGeolocation;
32 case WEB_VIEW_PERMISSION_TYPE_JAVASCRIPT_DIALOG: 34 case WEB_VIEW_PERMISSION_TYPE_JAVASCRIPT_DIALOG:
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 const PermissionResponseCallback& callback, 592 const PermissionResponseCallback& callback,
591 WebViewPermissionType permission_type, 593 WebViewPermissionType permission_type,
592 bool allowed_by_default) 594 bool allowed_by_default)
593 : callback(callback), 595 : callback(callback),
594 permission_type(permission_type), 596 permission_type(permission_type),
595 allowed_by_default(allowed_by_default) { 597 allowed_by_default(allowed_by_default) {
596 } 598 }
597 599
598 WebViewPermissionHelper::PermissionResponseInfo::~PermissionResponseInfo() { 600 WebViewPermissionHelper::PermissionResponseInfo::~PermissionResponseInfo() {
599 } 601 }
602
603 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698