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

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 955383003: ContentBrowserClient::RequestPermission replies with PermissionStatus instead of bool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android geolocation breakage 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 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"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 #else 280 #else
281 return NULL; 281 return NULL;
282 #endif 282 #endif
283 } 283 }
284 284
285 QuotaPermissionContext* 285 QuotaPermissionContext*
286 ShellContentBrowserClient::CreateQuotaPermissionContext() { 286 ShellContentBrowserClient::CreateQuotaPermissionContext() {
287 return new ShellQuotaPermissionContext(); 287 return new ShellQuotaPermissionContext();
288 } 288 }
289 289
290 void ShellContentBrowserClient::RequestPermission(
291 PermissionType permission,
292 WebContents* web_contents,
293 int bridge_id,
294 const GURL& requesting_frame,
295 bool user_gesture,
296 const base::Callback<void(PermissionStatus)>& callback) {
297 // Some Geolocation tests on Android are still expecting to have the
298 // permission granted. See https://crbug.com/463514.
299 if (permission == PERMISSION_GEOLOCATION) {
300 callback.Run(PERMISSION_STATUS_GRANTED);
301 return;
302 }
303
304 ContentBrowserClient::RequestPermission(
305 permission, web_contents, bridge_id,
306 requesting_frame, user_gesture, callback);
307 }
308
290 SpeechRecognitionManagerDelegate* 309 SpeechRecognitionManagerDelegate*
291 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() { 310 ShellContentBrowserClient::CreateSpeechRecognitionManagerDelegate() {
292 return new ShellSpeechRecognitionManagerDelegate(); 311 return new ShellSpeechRecognitionManagerDelegate();
293 } 312 }
294 313
295 net::NetLog* ShellContentBrowserClient::GetNetLog() { 314 net::NetLog* ShellContentBrowserClient::GetNetLog() {
296 return shell_browser_main_parts_->net_log(); 315 return shell_browser_main_parts_->net_log();
297 } 316 }
298 317
299 bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect( 318 bool ShellContentBrowserClient::ShouldSwapProcessesForRedirect(
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 ShellBrowserContext* 432 ShellBrowserContext*
414 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 433 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
415 BrowserContext* content_browser_context) { 434 BrowserContext* content_browser_context) {
416 if (content_browser_context == browser_context()) 435 if (content_browser_context == browser_context())
417 return browser_context(); 436 return browser_context();
418 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 437 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
419 return off_the_record_browser_context(); 438 return off_the_record_browser_context();
420 } 439 }
421 440
422 } // namespace content 441 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698