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

Side by Side Diff: chrome/browser/geolocation/geolocation_permission_context.cc

Issue 5730004: Rename ExtensionsService to ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/geolocation/geolocation_permission_context.h" 5 #include "chrome/browser/geolocation/geolocation_permission_context.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_thread.h" 10 #include "chrome/browser/browser_thread.h"
11 #include "chrome/browser/extensions/extensions_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 12 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
13 #include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h" 13 #include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h"
14 #include "chrome/browser/geolocation/geolocation_provider.h" 14 #include "chrome/browser/geolocation/geolocation_provider.h"
15 #include "chrome/browser/google/google_util.h" 15 #include "chrome/browser/google/google_util.h"
16 #include "chrome/browser/prefs/pref_service.h" 16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/renderer_host/render_process_host.h" 18 #include "chrome/browser/renderer_host/render_process_host.h"
19 #include "chrome/browser/renderer_host/render_view_host.h" 19 #include "chrome/browser/renderer_host/render_view_host.h"
20 #include "chrome/browser/renderer_host/render_view_host_notification_task.h" 20 #include "chrome/browser/renderer_host/render_view_host_notification_task.h"
21 #include "chrome/browser/tab_contents/infobar_delegate.h" 21 #include "chrome/browser/tab_contents/infobar_delegate.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { 366 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
367 BrowserThread::PostTask( 367 BrowserThread::PostTask(
368 BrowserThread::UI, FROM_HERE, 368 BrowserThread::UI, FROM_HERE,
369 NewRunnableMethod(this, 369 NewRunnableMethod(this,
370 &GeolocationPermissionContext::RequestGeolocationPermission, 370 &GeolocationPermissionContext::RequestGeolocationPermission,
371 render_process_id, render_view_id, bridge_id, requesting_frame)); 371 render_process_id, render_view_id, bridge_id, requesting_frame));
372 return; 372 return;
373 } 373 }
374 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 374 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
375 375
376 ExtensionsService* extensions = profile_->GetExtensionsService(); 376 ExtensionService* extensions = profile_->GetExtensionService();
377 if (extensions) { 377 if (extensions) {
378 const Extension* ext = extensions->GetExtensionByURL(requesting_frame); 378 const Extension* ext = extensions->GetExtensionByURL(requesting_frame);
379 if (!ext) 379 if (!ext)
380 ext = extensions->GetExtensionByWebExtent(requesting_frame); 380 ext = extensions->GetExtensionByWebExtent(requesting_frame);
381 if (ext && ext->HasApiPermission(Extension::kGeolocationPermission)) { 381 if (ext && ext->HasApiPermission(Extension::kGeolocationPermission)) {
382 ExtensionProcessManager* epm = profile_->GetExtensionProcessManager(); 382 ExtensionProcessManager* epm = profile_->GetExtensionProcessManager();
383 RenderProcessHost* process = epm->GetExtensionProcess(requesting_frame); 383 RenderProcessHost* process = epm->GetExtensionProcess(requesting_frame);
384 if (process && process->id() == render_process_id) { 384 if (process && process->id() == render_process_id) {
385 NotifyPermissionSet(render_process_id, render_view_id, bridge_id, 385 NotifyPermissionSet(render_process_id, render_view_id, bridge_id,
386 requesting_frame, true); 386 requesting_frame, true);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 BrowserThread::UI, FROM_HERE, 499 BrowserThread::UI, FROM_HERE,
500 NewRunnableMethod(this, 500 NewRunnableMethod(this,
501 &GeolocationPermissionContext::CancelPendingInfoBarRequest, 501 &GeolocationPermissionContext::CancelPendingInfoBarRequest,
502 render_process_id, render_view_id, bridge_id)); 502 render_process_id, render_view_id, bridge_id));
503 return; 503 return;
504 } 504 }
505 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 505 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
506 geolocation_infobar_queue_controller_->CancelInfoBarRequest( 506 geolocation_infobar_queue_controller_->CancelInfoBarRequest(
507 render_process_id, render_view_id, bridge_id); 507 render_process_id, render_view_id, bridge_id);
508 } 508 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_win.cc ('k') | chrome/browser/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698