| Index: extensions/renderer/process_info_native_handler.cc
|
| diff --git a/extensions/renderer/process_info_native_handler.cc b/extensions/renderer/process_info_native_handler.cc
|
| index 545a21274dc0fac29a7e135270d69ba7c21cfa21..32a15b8a7d61cd4299b408514d19dc419f3c07ed 100644
|
| --- a/extensions/renderer/process_info_native_handler.cc
|
| +++ b/extensions/renderer/process_info_native_handler.cc
|
| @@ -8,7 +8,9 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| +#include "extensions/renderer/bindings/api_binding_util.h"
|
| #include "extensions/renderer/script_context.h"
|
| +#include "gin/converter.h"
|
|
|
| namespace extensions {
|
|
|
| @@ -48,6 +50,9 @@ ProcessInfoNativeHandler::ProcessInfoNativeHandler(
|
| RouteFunction(
|
| "HasSwitch",
|
| base::Bind(&ProcessInfoNativeHandler::HasSwitch, base::Unretained(this)));
|
| + RouteFunction("GetPlatform",
|
| + base::Bind(&ProcessInfoNativeHandler::GetPlatform,
|
| + base::Unretained(this)));
|
| }
|
|
|
| void ProcessInfoNativeHandler::GetExtensionId(
|
| @@ -95,4 +100,11 @@ void ProcessInfoNativeHandler::HasSwitch(
|
| args.GetReturnValue().Set(v8::Boolean::New(args.GetIsolate(), has_switch));
|
| }
|
|
|
| +void ProcessInfoNativeHandler::GetPlatform(
|
| + const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| + CHECK_EQ(0, args.Length());
|
| + args.GetReturnValue().Set(
|
| + gin::StringToSymbol(args.GetIsolate(), binding::GetPlatformString()));
|
| +}
|
| +
|
| } // namespace extensions
|
|
|