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

Unified Diff: extensions/renderer/api_binding.h

Issue 2697363003: [Extensions Bindings] Move request dispatch to APIRequestHandler (Closed)
Patch Set: . Created 3 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
« no previous file with comments | « no previous file | extensions/renderer/api_binding.cc » ('j') | extensions/renderer/api_request_handler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/api_binding.h
diff --git a/extensions/renderer/api_binding.h b/extensions/renderer/api_binding.h
index f38a307c89f30a3cd0bfe63960b1f491568266cd..5c50ed90066981353f69a020ea883bd97a6b93b7 100644
--- a/extensions/renderer/api_binding.h
+++ b/extensions/renderer/api_binding.h
@@ -41,25 +41,6 @@ class APITypeReferenceMap;
// contexts.
class APIBinding {
public:
- // TODO(devlin): We may want to coalesce this with the
- // ExtensionHostMsg_Request_Params IPC struct.
- struct Request {
- Request();
- ~Request();
-
- int request_id = -1;
- std::string method_name;
- bool has_callback = false;
- bool has_user_gesture = false;
- std::unique_ptr<base::ListValue> arguments;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Request);
- };
-
- using SendRequestMethod =
- base::Callback<void(std::unique_ptr<Request>, v8::Local<v8::Context>)>;
-
// The callback for determining if a given API method (specified by |name|)
// is available.
using AvailabilityCallback = base::Callback<bool(const std::string& name)>;
@@ -75,7 +56,6 @@ class APIBinding {
const base::ListValue* type_definitions,
const base::ListValue* event_definitions,
const base::DictionaryValue* property_definitions,
- const SendRequestMethod& callback,
std::unique_ptr<APIBindingHooks> binding_hooks,
APITypeReferenceMap* type_refs,
APIRequestHandler* request_handler,
@@ -127,9 +107,6 @@ class APIBinding {
// The associated properties of the API, if any.
const base::DictionaryValue* property_definitions_;
- // The callback to use when an API is invoked with valid arguments.
- SendRequestMethod method_callback_;
-
// The registered hooks for this API.
std::unique_ptr<APIBindingHooks> binding_hooks_;
« no previous file with comments | « no previous file | extensions/renderer/api_binding.cc » ('j') | extensions/renderer/api_request_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698