blob: 979cb988b8a358d84e69f85a6a22daa485ab9b7a [file] [log] [blame]
[email protected]e6893672014-05-01 17:29:131// 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
12namespace extensions {
13
14class 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,
vrk85dfc5c2015-01-10 00:05:3220 bool is_component_extension,
[email protected]e6893672014-05-01 17:29:1321 int manifest_version,
22 bool send_request_disabled);
23
Devlin Cronind9ea8342018-01-27 06:00:0424 // ObjectBackedNativeHandler:
25 void AddRoutes() override;
26
[email protected]e6893672014-05-01 17:29:1327 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);
vrk85dfc5c2015-01-10 00:05:3231 void IsComponentExtension(const v8::FunctionCallbackInfo<v8::Value>& args);
[email protected]e6893672014-05-01 17:29:1332 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.cronine194d0222017-07-10 20:34:4935 void GetPlatform(const v8::FunctionCallbackInfo<v8::Value>& args);
[email protected]e6893672014-05-01 17:29:1336
37 std::string extension_id_;
38 std::string context_type_;
39 bool is_incognito_context_;
vrk85dfc5c2015-01-10 00:05:3240 bool is_component_extension_;
[email protected]e6893672014-05-01 17:29:1341 int manifest_version_;
42 bool send_request_disabled_;
43};
44
45} // namespace extensions
46
47#endif // EXTENSIONS_RENDERER_PROCESS_INFO_NATIVE_HANDLER_H_