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

Side by Side Diff: content/shell/browser/layout_test/layout_test_content_browser_client.cc

Issue 1020683003: Make content::PermissionType an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android compile Created 5 years, 9 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 "content/shell/browser/layout_test/layout_test_content_browser_client.h " 5 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h "
6 6
7 #include "content/public/browser/browser_context.h" 7 #include "content/public/browser/browser_context.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/navigator_connect_context.h" 9 #include "content/public/browser/navigator_connect_context.h"
10 #include "content/public/browser/permission_type.h"
10 #include "content/public/browser/render_process_host.h" 11 #include "content/public/browser/render_process_host.h"
11 #include "content/public/browser/storage_partition.h" 12 #include "content/public/browser/storage_partition.h"
12 #include "content/shell/browser/layout_test/layout_test_browser_context.h" 13 #include "content/shell/browser/layout_test/layout_test_browser_context.h"
13 #include "content/shell/browser/layout_test/layout_test_message_filter.h" 14 #include "content/shell/browser/layout_test/layout_test_message_filter.h"
14 #include "content/shell/browser/layout_test/layout_test_navigator_connect_servic e_factory.h" 15 #include "content/shell/browser/layout_test/layout_test_navigator_connect_servic e_factory.h"
15 #include "content/shell/browser/layout_test/layout_test_notification_manager.h" 16 #include "content/shell/browser/layout_test/layout_test_notification_manager.h"
16 #include "content/shell/browser/shell_browser_context.h" 17 #include "content/shell/browser/shell_browser_context.h"
17 #include "content/shell/common/shell_messages.h" 18 #include "content/shell/common/shell_messages.h"
18 #include "content/shell/common/webkit_test_helpers.h" 19 #include "content/shell/common/webkit_test_helpers.h"
19 20
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 82 }
82 83
83 void LayoutTestContentBrowserClient::RequestPermission( 84 void LayoutTestContentBrowserClient::RequestPermission(
84 PermissionType permission, 85 PermissionType permission,
85 WebContents* web_contents, 86 WebContents* web_contents,
86 int bridge_id, 87 int bridge_id,
87 const GURL& requesting_frame, 88 const GURL& requesting_frame,
88 bool user_gesture, 89 bool user_gesture,
89 const base::Callback<void(PermissionStatus)>& callback) { 90 const base::Callback<void(PermissionStatus)>& callback) {
90 DCHECK_CURRENTLY_ON(BrowserThread::UI); 91 DCHECK_CURRENTLY_ON(BrowserThread::UI);
91 if (permission == content::PERMISSION_NOTIFICATIONS) { 92 if (permission == PermissionType::NOTIFICATIONS) {
92 BrowserThread::PostTask( 93 BrowserThread::PostTask(
93 BrowserThread::IO, 94 BrowserThread::IO,
94 FROM_HERE, 95 FROM_HERE,
95 base::Bind(&RequestDesktopNotificationPermissionOnIO, 96 base::Bind(&RequestDesktopNotificationPermissionOnIO,
96 requesting_frame, 97 requesting_frame,
97 callback)); 98 callback));
98 return; 99 return;
99 } 100 }
100 ShellContentBrowserClient::RequestPermission(permission, 101 ShellContentBrowserClient::RequestPermission(permission,
101 web_contents, 102 web_contents,
102 bridge_id, 103 bridge_id,
103 requesting_frame, 104 requesting_frame,
104 user_gesture, 105 user_gesture,
105 callback); 106 callback);
106 } 107 }
107 108
108 PlatformNotificationService* 109 PlatformNotificationService*
109 LayoutTestContentBrowserClient::GetPlatformNotificationService() { 110 LayoutTestContentBrowserClient::GetPlatformNotificationService() {
110 return layout_test_notification_manager_.get(); 111 return layout_test_notification_manager_.get();
111 } 112 }
112 113
113 void LayoutTestContentBrowserClient::GetAdditionalNavigatorConnectServices( 114 void LayoutTestContentBrowserClient::GetAdditionalNavigatorConnectServices(
114 const scoped_refptr<NavigatorConnectContext>& context) { 115 const scoped_refptr<NavigatorConnectContext>& context) {
115 context->AddFactory( 116 context->AddFactory(
116 make_scoped_ptr(new LayoutTestNavigatorConnectServiceFactory)); 117 make_scoped_ptr(new LayoutTestNavigatorConnectServiceFactory));
117 } 118 }
118 119
119 } // namespace content 120 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698