| OLD | NEW |
| 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_JS_EXTENSION_BINDINGS_SYSTEM_H_ | 5 #ifndef EXTENSIONS_RENDERER_JS_EXTENSION_BINDINGS_SYSTEM_H_ |
| 6 #define EXTENSIONS_RENDERER_JS_EXTENSION_BINDINGS_SYSTEM_H_ | 6 #define EXTENSIONS_RENDERER_JS_EXTENSION_BINDINGS_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 ~JsExtensionBindingsSystem() override; | 23 ~JsExtensionBindingsSystem() override; |
| 24 | 24 |
| 25 // ExtensionBindingsSystem: | 25 // ExtensionBindingsSystem: |
| 26 void DidCreateScriptContext(ScriptContext* context) override; | 26 void DidCreateScriptContext(ScriptContext* context) override; |
| 27 void WillReleaseScriptContext(ScriptContext* context) override; | 27 void WillReleaseScriptContext(ScriptContext* context) override; |
| 28 void UpdateBindingsForContext(ScriptContext* context) override; | 28 void UpdateBindingsForContext(ScriptContext* context) override; |
| 29 void DispatchEventInContext(const std::string& event_name, | 29 void DispatchEventInContext(const std::string& event_name, |
| 30 const base::ListValue* event_args, | 30 const base::ListValue* event_args, |
| 31 const base::DictionaryValue* filtering_info, | 31 const base::DictionaryValue* filtering_info, |
| 32 ScriptContext* context) override; | 32 ScriptContext* context) override; |
| 33 bool HasEventListenerInContext(const std::string& event_name, |
| 34 ScriptContext* context) override; |
| 33 void HandleResponse(int request_id, | 35 void HandleResponse(int request_id, |
| 34 bool success, | 36 bool success, |
| 35 const base::ListValue& response, | 37 const base::ListValue& response, |
| 36 const std::string& error) override; | 38 const std::string& error) override; |
| 37 RequestSender* GetRequestSender() override; | 39 RequestSender* GetRequestSender() override; |
| 38 | 40 |
| 39 private: | 41 private: |
| 40 void RegisterBinding(const std::string& api_name, | 42 void RegisterBinding(const std::string& api_name, |
| 41 const std::string& api_bind_name, | 43 const std::string& api_bind_name, |
| 42 ScriptContext* context); | 44 ScriptContext* context); |
| 43 | 45 |
| 44 ResourceBundleSourceMap* source_map_ = nullptr; | 46 ResourceBundleSourceMap* source_map_ = nullptr; |
| 45 | 47 |
| 46 std::unique_ptr<RequestSender> request_sender_; | 48 std::unique_ptr<RequestSender> request_sender_; |
| 47 | 49 |
| 48 DISALLOW_COPY_AND_ASSIGN(JsExtensionBindingsSystem); | 50 DISALLOW_COPY_AND_ASSIGN(JsExtensionBindingsSystem); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 } // namespace extensions | 53 } // namespace extensions |
| 52 | 54 |
| 53 #endif // EXTENSIONS_RENDERER_JS_EXTENSION_BINDINGS_SYSTEM_H_ | 55 #endif // EXTENSIONS_RENDERER_JS_EXTENSION_BINDINGS_SYSTEM_H_ |
| OLD | NEW |