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
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,
20                           int manifest_version,
21                           bool send_request_disabled);
22
23 private:
24  void GetExtensionId(const v8::FunctionCallbackInfo<v8::Value>& args);
25  void GetContextType(const v8::FunctionCallbackInfo<v8::Value>& args);
26  void InIncognitoContext(const v8::FunctionCallbackInfo<v8::Value>& args);
27  void GetManifestVersion(const v8::FunctionCallbackInfo<v8::Value>& args);
28  void IsSendRequestDisabled(const v8::FunctionCallbackInfo<v8::Value>& args);
29  void HasSwitch(const v8::FunctionCallbackInfo<v8::Value>& args);
30
31  std::string extension_id_;
32  std::string context_type_;
33  bool is_incognito_context_;
34  int manifest_version_;
35  bool send_request_disabled_;
36};
37
38}  // namespace extensions
39
40#endif  // EXTENSIONS_RENDERER_PROCESS_INFO_NATIVE_HANDLER_H_
41