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

Unified Diff: chrome/browser/geolocation/chrome_geolocation_permission_context.h

Issue 265773002: [Media,Geolocation] Add permission bubble cancellation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/chrome_geolocation_permission_context.h
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.h b/chrome/browser/geolocation/chrome_geolocation_permission_context.h
index 38552c86272ef94c4645ecd3b5b70989dfe1b2a9..95f5a70008e312b2e38b4a9a206190482281876f 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.h
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.h
@@ -5,8 +5,10 @@
#ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
#define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
+#include <map>
#include <string>
+#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/content_settings/permission_queue_controller.h"
#include "content/public/browser/geolocation_permission_context.h"
@@ -15,6 +17,7 @@ namespace content {
class WebContents;
}
+class GeolocationPermissionRequest;
class PermissionRequestID;
class Profile;
@@ -87,6 +90,8 @@ class ChromeGeolocationPermissionContext
virtual PermissionQueueController* CreateQueueController();
private:
+ friend class GeolocationPermissionRequest;
+
// Removes any pending InfoBar request.
void CancelPendingInfobarRequest(const PermissionRequestID& id);
@@ -97,11 +102,17 @@ class ChromeGeolocationPermissionContext
const std::string accept_button_label,
base::Callback<void(bool)> callback);
+ // Notify the context that a particular request object is no longer needed.
+ void RequestFinished(GeolocationPermissionRequest* request);
+
// These must only be accessed from the UI thread.
Profile* const profile_;
bool shutting_down_;
scoped_ptr<PermissionQueueController> permission_queue_controller_;
+ base::ScopedPtrHashMap<std::string, GeolocationPermissionRequest>
+ pending_requests_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContext);
};
« no previous file with comments | « no previous file | chrome/browser/geolocation/chrome_geolocation_permission_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698