OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SCRIPT_CONTEXT_H_ | 5 #ifndef EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ |
6 #define EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ | 6 #define EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // TODO(devlin): Remove the above variants in favor of this. | 122 // TODO(devlin): Remove the above variants in favor of this. |
123 void SafeCallFunction(const v8::Local<v8::Function>& function, | 123 void SafeCallFunction(const v8::Local<v8::Function>& function, |
124 int argc, | 124 int argc, |
125 v8::Local<v8::Value> argv[]); | 125 v8::Local<v8::Value> argv[]); |
126 void SafeCallFunction( | 126 void SafeCallFunction( |
127 const v8::Local<v8::Function>& function, | 127 const v8::Local<v8::Function>& function, |
128 int argc, | 128 int argc, |
129 v8::Local<v8::Value> argv[], | 129 v8::Local<v8::Value> argv[], |
130 const ScriptInjectionCallback::CompleteCallback& callback); | 130 const ScriptInjectionCallback::CompleteCallback& callback); |
131 | 131 |
132 void DispatchEvent(const char* event_name, v8::Local<v8::Array> args) const; | |
133 | |
134 // Returns the availability of the API |api_name|. | 132 // Returns the availability of the API |api_name|. |
135 Feature::Availability GetAvailability(const std::string& api_name); | 133 Feature::Availability GetAvailability(const std::string& api_name); |
136 // Returns the availability of the API |api_name|. | 134 // Returns the availability of the API |api_name|. |
137 // |check_alias| Whether API that has an alias that is available should be | 135 // |check_alias| Whether API that has an alias that is available should be |
138 // considered available (even if the API itself is not available). | 136 // considered available (even if the API itself is not available). |
139 Feature::Availability GetAvailability(const std::string& api_name, | 137 Feature::Availability GetAvailability(const std::string& api_name, |
140 CheckAliasStatus check_alias); | 138 CheckAliasStatus check_alias); |
141 | 139 |
142 // Returns a string description of the type of context this is. | 140 // Returns a string description of the type of context this is. |
143 std::string GetContextTypeDescription() const; | 141 std::string GetContextTypeDescription() const; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 std::unique_ptr<Runner> runner_; | 274 std::unique_ptr<Runner> runner_; |
277 | 275 |
278 base::ThreadChecker thread_checker_; | 276 base::ThreadChecker thread_checker_; |
279 | 277 |
280 DISALLOW_COPY_AND_ASSIGN(ScriptContext); | 278 DISALLOW_COPY_AND_ASSIGN(ScriptContext); |
281 }; | 279 }; |
282 | 280 |
283 } // namespace extensions | 281 } // namespace extensions |
284 | 282 |
285 #endif // EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ | 283 #endif // EXTENSIONS_RENDERER_SCRIPT_CONTEXT_H_ |
OLD | NEW |