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

Unified Diff: chrome/browser/extensions/extension_function_dispatcher.h

Issue 42680: Add more of the server-side plumbing for extension APIs. Also (Closed)
Patch Set: Introduce SyncExtensionFunction Created 11 years, 9 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/extensions/extension_function_dispatcher.h
diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b9c49ef1fb8be4abdfa6bd9c3d55bb70a557cb3
--- /dev/null
+++ b/chrome/browser/extensions/extension_function_dispatcher.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2009 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
+
+#include <string>
+#include <vector>
+
+#include "base/values.h"
+
+class ExtensionFunction;
+class RenderViewHost;
+
+// ExtensionFunctionDispatcher receives requests to execute functions from
+// Chromium extensions running in a RenderViewHost and dispatches them to the
+// appropriate handler. It lives entirely on the UI thread.
+class ExtensionFunctionDispatcher {
+ public:
+ // Gets a list of all known extension function names.
+ static void GetAllFunctionNames(std::vector<std::string>* names);
+
+ ExtensionFunctionDispatcher(RenderViewHost* render_view_host);
+
+ // Handle a request to execute an extension function.
+ void HandleRequest(const std::string& name, const std::string& args,
+ int callback_id);
+
+ // Send a response to a function.
+ void SendResponse(ExtensionFunction* api);
+
+ private:
+ RenderViewHost* render_view_host_;
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_
« no previous file with comments | « chrome/browser/extensions/extension_function.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698