Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / extensions / renderer / test_native_handler.cc
blob31e7dcb9d75abf52846ddf67d60d9d5379085347
1 // Copyright 2015 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.
5 #include "extensions/renderer/test_native_handler.h"
7 #include "extensions/renderer/wake_event_page.h"
9 namespace extensions {
11 TestNativeHandler::TestNativeHandler(ScriptContext* context)
12 : ObjectBackedNativeHandler(context) {
13 RouteFunction(
14 "GetWakeEventPage",
15 base::Bind(&TestNativeHandler::GetWakeEventPage, base::Unretained(this)));
18 void TestNativeHandler::GetWakeEventPage(
19 const v8::FunctionCallbackInfo<v8::Value>& args) {
20 CHECK_EQ(0, args.Length());
21 args.GetReturnValue().Set(WakeEventPage::Get()->GetForContext(context()));
24 } // namespace extensions