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

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: Fix 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
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..2fc2e79aac6c7f5ab300ed278527fe68909844a0 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.h
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
#define CHROME_BROWSER_GEOLOCATION_CHROME_GEOLOCATION_PERMISSION_CONTEXT_H_
+#include <map>
#include <string>
#include "base/memory/scoped_ptr.h"
@@ -15,6 +16,7 @@ namespace content {
class WebContents;
}
+class GeolocationPermissionRequest;
class PermissionRequestID;
class Profile;
@@ -87,6 +89,8 @@ class ChromeGeolocationPermissionContext
virtual PermissionQueueController* CreateQueueController();
private:
+ friend class GeolocationPermissionRequest;
+
// Removes any pending InfoBar request.
void CancelPendingInfobarRequest(const PermissionRequestID& id);
@@ -97,11 +101,16 @@ 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_;
+ std::map<std::string, GeolocationPermissionRequest*> pending_requests_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeGeolocationPermissionContext);
};

Powered by Google App Engine
This is Rietveld 408576698