| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_BINDINGS_API_BINDING_JS_UTIL_H_ | 5 #ifndef EXTENSIONS_RENDERER_BINDINGS_API_BINDING_JS_UTIL_H_ |
| 6 #define EXTENSIONS_RENDERER_BINDINGS_API_BINDING_JS_UTIL_H_ | 6 #define EXTENSIONS_RENDERER_BINDINGS_API_BINDING_JS_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 const std::string& event_name, | 55 const std::string& event_name, |
| 56 v8::Local<v8::Function> massager); | 56 v8::Local<v8::Function> massager); |
| 57 | 57 |
| 58 // A handler to allow custom bindings to create custom extension API event | 58 // A handler to allow custom bindings to create custom extension API event |
| 59 // objects (e.g. foo.onBar). | 59 // objects (e.g. foo.onBar). |
| 60 // TODO(devlin): Currently, we ignore schema. We may want to take it into | 60 // TODO(devlin): Currently, we ignore schema. We may want to take it into |
| 61 // account. | 61 // account. |
| 62 void CreateCustomEvent(gin::Arguments* arguments, | 62 void CreateCustomEvent(gin::Arguments* arguments, |
| 63 v8::Local<v8::Value> v8_event_name, | 63 v8::Local<v8::Value> v8_event_name, |
| 64 v8::Local<v8::Value> unused_schema, | 64 v8::Local<v8::Value> unused_schema, |
| 65 bool supports_filters); | 65 bool supports_filters, |
| 66 bool supports_lazy_listeners); |
| 66 | 67 |
| 67 // Creates a new declarative event. | 68 // Creates a new declarative event. |
| 68 void CreateCustomDeclarativeEvent( | 69 void CreateCustomDeclarativeEvent( |
| 69 gin::Arguments* arguments, | 70 gin::Arguments* arguments, |
| 70 const std::string& event_name, | 71 const std::string& event_name, |
| 71 const std::vector<std::string>& actions_list, | 72 const std::vector<std::string>& actions_list, |
| 72 const std::vector<std::string>& conditions_list, | 73 const std::vector<std::string>& conditions_list, |
| 73 int webview_instance_id); | 74 int webview_instance_id); |
| 74 | 75 |
| 75 // Invalidates an event, removing its listeners and preventing any more from | 76 // Invalidates an event, removing its listeners and preventing any more from |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 ExceptionHandler* const exception_handler_; | 115 ExceptionHandler* const exception_handler_; |
| 115 | 116 |
| 116 binding::RunJSFunction run_js_; | 117 binding::RunJSFunction run_js_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(APIBindingJSUtil); | 119 DISALLOW_COPY_AND_ASSIGN(APIBindingJSUtil); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace extensions | 122 } // namespace extensions |
| 122 | 123 |
| 123 #endif // EXTENSIONS_RENDERER_BINDINGS_API_BINDING_JS_UTIL_H_ | 124 #endif // EXTENSIONS_RENDERER_BINDINGS_API_BINDING_JS_UTIL_H_ |
| OLD | NEW |