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

Unified Diff: chrome/renderer/permission_request_map.h

Issue 170733004: Avoid sync IPCs for FileSystem API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Async File System permission Created 6 years, 10 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/renderer/permission_request_map.h
diff --git a/chrome/renderer/permission_request_map.h b/chrome/renderer/permission_request_map.h
new file mode 100644
index 0000000000000000000000000000000000000000..d5df72fab9c7bf9b6a4043caadf5f17d5c1f42c0
--- /dev/null
+++ b/chrome/renderer/permission_request_map.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_CHILD_FILEAPI_PERMISSION_REQUEST_MAP_H_
+#define CONTENT_CHILD_FILEAPI_PERMISSION_REQUEST_MAP_H_
+
+#include "base/id_map.h"
+
+namespace blink {
+class WebPermissionCallbacks;
+}
+
+namespace content {
+
+class PermissionRequestMap {
+ public:
+ static PermissionRequestMap* Get();
+
+ static PermissionRequestMap* GetOrCreate();
+
+ virtual ~PermissionRequestMap();
+
+ int RegisterPermissionCallbacks(
+ const blink::WebPermissionCallbacks& permission_callbacks);
+
+ blink::WebPermissionCallbacks* GetAndUnregisterCallbacks(int callbacks_id);
+
+ private:
+ PermissionRequestMap();
+
+ IDMap<blink::WebPermissionCallbacks> permission_request_map_;
+
+ DISALLOW_COPY_AND_ASSIGN(PermissionRequestMap);
+};
+
+} // namespace content
+
+#endif // CONTENT_CHILD_FILEAPI_PERMISSION_REQUEST_MAP_H_

Powered by Google App Engine
This is Rietveld 408576698