| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/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/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "chrome/browser/content_settings/host_content_settings_map.h" | 14 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 15 #include "chrome/browser/content_settings/permission_request_id.h" | 15 #include "chrome/browser/content_settings/permission_request_id.h" |
| 16 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 16 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/tab_contents/tab_util.h" | 18 #include "chrome/browser/tab_contents/tab_util.h" |
| 19 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" | 19 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h" |
| 20 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" | 20 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" |
| 21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 22 #include "chrome/grit/generated_resources.h" |
| 22 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" |
| 24 #include "content/public/browser/render_view_host.h" | 25 #include "content/public/browser/render_view_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
| 26 #include "grit/generated_resources.h" | |
| 27 #include "grit/theme_resources.h" | 27 #include "grit/theme_resources.h" |
| 28 #include "net/base/net_util.h" | 28 #include "net/base/net_util.h" |
| 29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
| 30 | 30 |
| 31 class GeolocationPermissionRequest : public PermissionBubbleRequest { | 31 class GeolocationPermissionRequest : public PermissionBubbleRequest { |
| 32 public: | 32 public: |
| 33 GeolocationPermissionRequest(GeolocationPermissionContext* context, | 33 GeolocationPermissionRequest(GeolocationPermissionContext* context, |
| 34 const PermissionRequestID& id, | 34 const PermissionRequestID& id, |
| 35 const GURL& requesting_frame, | 35 const GURL& requesting_frame, |
| 36 const GURL& embedder, | 36 const GURL& embedder, |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 if (cancelling != NULL && web_contents != NULL && | 333 if (cancelling != NULL && web_contents != NULL && |
| 334 PermissionBubbleManager::FromWebContents(web_contents) != NULL) { | 334 PermissionBubbleManager::FromWebContents(web_contents) != NULL) { |
| 335 PermissionBubbleManager::FromWebContents(web_contents)-> | 335 PermissionBubbleManager::FromWebContents(web_contents)-> |
| 336 CancelRequest(cancelling); | 336 CancelRequest(cancelling); |
| 337 } | 337 } |
| 338 return; | 338 return; |
| 339 } | 339 } |
| 340 | 340 |
| 341 QueueController()->CancelInfoBarRequest(id); | 341 QueueController()->CancelInfoBarRequest(id); |
| 342 } | 342 } |
| OLD | NEW |