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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.h" |
14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 14 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
16 #include "chrome/browser/extensions/extension_system.h" | 16 #include "chrome/browser/extensions/extension_system.h" |
17 #include "chrome/browser/extensions/suggest_permission_util.h" | 17 #include "chrome/browser/extensions/suggest_permission_util.h" |
18 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h" | 18 #include "chrome/browser/geolocation/geolocation_infobar_queue_controller.h" |
19 #include "chrome/browser/geolocation/geolocation_permission_request_id.h" | 19 #include "chrome/browser/geolocation/geolocation_permission_request_id.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/tab_contents/tab_util.h" | 21 #include "chrome/browser/tab_contents/tab_util.h" |
22 #include "chrome/common/extensions/extension.h" | 22 #include "chrome/common/extensions/extension.h" |
23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
24 #include "content/public/browser/render_view_host.h" | 24 #include "content/public/browser/render_view_host.h" |
25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
26 #include "extensions/browser/view_type_utils.h" | 26 #include "extensions/browser/view_type_utils.h" |
27 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 27 #include "third_party/WebKit/public/platform/WebString.h" |
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
29 | 29 |
30 using extensions::APIPermission; | 30 using extensions::APIPermission; |
31 | 31 |
32 ChromeGeolocationPermissionContext::ChromeGeolocationPermissionContext( | 32 ChromeGeolocationPermissionContext::ChromeGeolocationPermissionContext( |
33 Profile* profile) | 33 Profile* profile) |
34 : profile_(profile), | 34 : profile_(profile), |
35 shutting_down_(false) { | 35 shutting_down_(false) { |
36 } | 36 } |
37 | 37 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 base::Bind( | 204 base::Bind( |
205 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, | 205 &ChromeGeolocationPermissionContext::CancelPendingInfoBarRequest, |
206 this, id)); | 206 this, id)); |
207 return; | 207 return; |
208 } | 208 } |
209 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 209 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
210 if (shutting_down_) | 210 if (shutting_down_) |
211 return; | 211 return; |
212 QueueController()->CancelInfoBarRequest(id); | 212 QueueController()->CancelInfoBarRequest(id); |
213 } | 213 } |
OLD | NEW |