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

Side by Side Diff: extensions/renderer/api_bindings_system.h

Issue 2727583004: [Extensions Bindings] Add a registerEventArgumentMassager (Closed)
Patch Set: . Created 3 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 unified diff | Download patch
« no previous file with comments | « extensions/renderer/api_binding_bridge.cc ('k') | extensions/renderer/api_event_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 5 #ifndef EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
6 #define EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 6 #define EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // efficient to register multiple hooks for the same API. 77 // efficient to register multiple hooks for the same API.
78 APIBindingHooks* GetHooksForAPI(const std::string& api_name); 78 APIBindingHooks* GetHooksForAPI(const std::string& api_name);
79 79
80 // Registers the handler for creating a custom type with the given 80 // Registers the handler for creating a custom type with the given
81 // |type_name|, where |type_name| is the fully-qualified type (e.g. 81 // |type_name|, where |type_name| is the fully-qualified type (e.g.
82 // storage.StorageArea). 82 // storage.StorageArea).
83 void RegisterCustomType(const std::string& type_name, 83 void RegisterCustomType(const std::string& type_name,
84 const CustomTypeHandler& function); 84 const CustomTypeHandler& function);
85 85
86 APIRequestHandler* request_handler() { return &request_handler_; } 86 APIRequestHandler* request_handler() { return &request_handler_; }
87 APIEventHandler* event_handler() { return &event_handler_; }
87 APITypeReferenceMap* type_reference_map() { return &type_reference_map_; } 88 APITypeReferenceMap* type_reference_map() { return &type_reference_map_; }
88 89
89 private: 90 private:
90 // Creates a new APIBinding for the given |api_name|. 91 // Creates a new APIBinding for the given |api_name|.
91 std::unique_ptr<APIBinding> CreateNewAPIBinding(const std::string& api_name); 92 std::unique_ptr<APIBinding> CreateNewAPIBinding(const std::string& api_name);
92 93
93 // Callback for the APITypeReferenceMap in order to initialize an unknown 94 // Callback for the APITypeReferenceMap in order to initialize an unknown
94 // type. 95 // type.
95 void InitializeType(const std::string& name); 96 void InitializeType(const std::string& name);
96 97
(...skipping 29 matching lines...) Expand all
126 // The method to retrieve the DictionaryValue describing a given extension 127 // The method to retrieve the DictionaryValue describing a given extension
127 // API. Curried in for testing purposes so we can use fake APIs. 128 // API. Curried in for testing purposes so we can use fake APIs.
128 GetAPISchemaMethod get_api_schema_; 129 GetAPISchemaMethod get_api_schema_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem); 131 DISALLOW_COPY_AND_ASSIGN(APIBindingsSystem);
131 }; 132 };
132 133
133 } // namespace 134 } // namespace
134 135
135 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_ 136 #endif // EXTENSIONS_RENDERER_API_BINDINGS_SYSTEM_H_
OLDNEW
« no previous file with comments | « extensions/renderer/api_binding_bridge.cc ('k') | extensions/renderer/api_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698