[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef EXTENSIONS_RENDERER_PROCESS_INFO_NATIVE_HANDLER_H_ |
| 6 | #define EXTENSIONS_RENDERER_PROCESS_INFO_NATIVE_HANDLER_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include "extensions/renderer/object_backed_native_handler.h" |
| 11 | |
| 12 | namespace extensions { |
| 13 | |
| 14 | class ProcessInfoNativeHandler : public ObjectBackedNativeHandler { |
| 15 | public: |
| 16 | ProcessInfoNativeHandler(ScriptContext* context, |
| 17 | const std::string& extension_id, |
| 18 | const std::string& context_type, |
| 19 | bool is_incognito_context, |
vrk | 85dfc5c | 2015-01-10 00:05:32 | [diff] [blame] | 20 | bool is_component_extension, |
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 21 | int manifest_version, |
| 22 | bool send_request_disabled); |
| 23 | |
Devlin Cronin | d9ea834 | 2018-01-27 06:00:04 | [diff] [blame] | 24 | // ObjectBackedNativeHandler: |
| 25 | void AddRoutes() override; |
| 26 | |
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 27 | private: |
| 28 | void GetExtensionId(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 29 | void GetContextType(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 30 | void InIncognitoContext(const v8::FunctionCallbackInfo<v8::Value>& args); |
vrk | 85dfc5c | 2015-01-10 00:05:32 | [diff] [blame] | 31 | void IsComponentExtension(const v8::FunctionCallbackInfo<v8::Value>& args); |
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 32 | void GetManifestVersion(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 33 | void IsSendRequestDisabled(const v8::FunctionCallbackInfo<v8::Value>& args); |
| 34 | void HasSwitch(const v8::FunctionCallbackInfo<v8::Value>& args); |
rdevlin.cronin | e194d022 | 2017-07-10 20:34:49 | [diff] [blame] | 35 | void GetPlatform(const v8::FunctionCallbackInfo<v8::Value>& args); |
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 36 | |
| 37 | std::string extension_id_; |
| 38 | std::string context_type_; |
| 39 | bool is_incognito_context_; |
vrk | 85dfc5c | 2015-01-10 00:05:32 | [diff] [blame] | 40 | bool is_component_extension_; |
[email protected] | e689367 | 2014-05-01 17:29:13 | [diff] [blame] | 41 | int manifest_version_; |
| 42 | bool send_request_disabled_; |
| 43 | }; |
| 44 | |
| 45 | } // namespace extensions |
| 46 | |
| 47 | #endif // EXTENSIONS_RENDERER_PROCESS_INFO_NATIVE_HANDLER_H_ |