OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
6 | 6 |
7 #include <functional> | 7 #include <functional> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 | 606 |
607 ExtensionService* extension_service = profile_->GetExtensionService(); | 607 ExtensionService* extension_service = profile_->GetExtensionService(); |
608 if (extension_service) { | 608 if (extension_service) { |
609 const extensions::Extension* extension = | 609 const extensions::Extension* extension = |
610 extension_service->extensions()->GetExtensionOrAppByURL( | 610 extension_service->extensions()->GetExtensionOrAppByURL( |
611 ExtensionURLInfo( | 611 ExtensionURLInfo( |
612 WebSecurityOrigin::createFromString( | 612 WebSecurityOrigin::createFromString( |
613 UTF8ToUTF16(requesting_frame.spec())), | 613 UTF8ToUTF16(requesting_frame.spec())), |
614 requesting_frame)); | 614 requesting_frame)); |
615 if (extension && | 615 if (extension && |
616 extension->HasAPIPermission(ExtensionAPIPermission::kGeolocation)) { | 616 extension->HasAPIPermission(extensions::APIPermission::kGeolocation)) { |
617 // Make sure the extension is in the calling process. | 617 // Make sure the extension is in the calling process. |
618 if (extension_service->process_map()->Contains( | 618 if (extension_service->process_map()->Contains( |
619 extension->id(), render_process_id)) { | 619 extension->id(), render_process_id)) { |
620 NotifyPermissionSet(render_process_id, render_view_id, bridge_id, | 620 NotifyPermissionSet(render_process_id, render_view_id, bridge_id, |
621 requesting_frame, callback, true); | 621 requesting_frame, callback, true); |
622 return; | 622 return; |
623 } | 623 } |
624 } | 624 } |
625 } | 625 } |
626 | 626 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 BrowserThread::UI, FROM_HERE, | 705 BrowserThread::UI, FROM_HERE, |
706 base::Bind( | 706 base::Bind( |
707 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, | 707 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, |
708 this, render_process_id, render_view_id, bridge_id)); | 708 this, render_process_id, render_view_id, bridge_id)); |
709 return; | 709 return; |
710 } | 710 } |
711 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 711 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
712 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, | 712 geolocation_infobar_queue_controller_->CancelInfoBarRequest(render_process_id, |
713 render_view_id, bridge_id); | 713 render_view_id, bridge_id); |
714 } | 714 } |
OLD | NEW |