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

Side by Side Diff: content/shell/browser/shell_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
« no previous file with comments | « content/shell/browser/layout_test/layout_test_content_browser_client.cc ('k') | no next file » | 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 #include "content/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "content/public/browser/client_certificate_delegate.h" 13 #include "content/public/browser/client_certificate_delegate.h"
14 #include "content/public/browser/page_navigator.h" 14 #include "content/public/browser/page_navigator.h"
15 #include "content/public/browser/permission_type.h"
15 #include "content/public/browser/render_process_host.h" 16 #include "content/public/browser/render_process_host.h"
16 #include "content/public/browser/resource_dispatcher_host.h" 17 #include "content/public/browser/resource_dispatcher_host.h"
17 #include "content/public/browser/storage_partition.h" 18 #include "content/public/browser/storage_partition.h"
18 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
19 #include "content/public/common/url_constants.h" 20 #include "content/public/common/url_constants.h"
20 #include "content/public/common/web_preferences.h" 21 #include "content/public/common/web_preferences.h"
21 #include "content/shell/browser/ipc_echo_message_filter.h" 22 #include "content/shell/browser/ipc_echo_message_filter.h"
22 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h" 23 #include "content/shell/browser/layout_test/layout_test_browser_main_parts.h"
23 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host _delegate.h" 24 #include "content/shell/browser/layout_test/layout_test_resource_dispatcher_host _delegate.h"
24 #include "content/shell/browser/shell.h" 25 #include "content/shell/browser/shell.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 299
299 void ShellContentBrowserClient::RequestPermission( 300 void ShellContentBrowserClient::RequestPermission(
300 PermissionType permission, 301 PermissionType permission,
301 WebContents* web_contents, 302 WebContents* web_contents,
302 int bridge_id, 303 int bridge_id,
303 const GURL& requesting_frame, 304 const GURL& requesting_frame,
304 bool user_gesture, 305 bool user_gesture,
305 const base::Callback<void(PermissionStatus)>& callback) { 306 const base::Callback<void(PermissionStatus)>& callback) {
306 // Some Geolocation tests on Android are still expecting to have the 307 // Some Geolocation tests on Android are still expecting to have the
307 // permission granted. See https://crbug.com/463514. 308 // permission granted. See https://crbug.com/463514.
308 if (permission == PERMISSION_GEOLOCATION) { 309 if (permission == PermissionType::GEOLOCATION) {
309 callback.Run(PERMISSION_STATUS_GRANTED); 310 callback.Run(PERMISSION_STATUS_GRANTED);
310 return; 311 return;
311 } 312 }
312 313
313 ContentBrowserClient::RequestPermission( 314 ContentBrowserClient::RequestPermission(
314 permission, web_contents, bridge_id, 315 permission, web_contents, bridge_id,
315 requesting_frame, user_gesture, callback); 316 requesting_frame, user_gesture, callback);
316 } 317 }
317 318
318 SpeechRecognitionManagerDelegate* 319 SpeechRecognitionManagerDelegate*
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 ShellBrowserContext* 442 ShellBrowserContext*
442 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 443 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
443 BrowserContext* content_browser_context) { 444 BrowserContext* content_browser_context) {
444 if (content_browser_context == browser_context()) 445 if (content_browser_context == browser_context())
445 return browser_context(); 446 return browser_context();
446 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 447 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
447 return off_the_record_browser_context(); 448 return off_the_record_browser_context();
448 } 449 }
449 450
450 } // namespace content 451 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_content_browser_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698