blob: 7684c477b57d6bce8c9e3ba3f46bbe9c9ba83d3a [file] [log] [blame]
kalman12033f122015-08-21 19:30:131// 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.
4
5#include "extensions/renderer/test_native_handler.h"
6
7#include "extensions/renderer/wake_event_page.h"
8
9namespace extensions {
10
11TestNativeHandler::TestNativeHandler(ScriptContext* context)
12 : ObjectBackedNativeHandler(context) {
13 RouteFunction(
rdevlin.croninc0569cc2016-04-15 21:51:2114 "GetWakeEventPage", "test",
kalman12033f122015-08-21 19:30:1315 base::Bind(&TestNativeHandler::GetWakeEventPage, base::Unretained(this)));
16}
17
18void TestNativeHandler::GetWakeEventPage(
19 const v8::FunctionCallbackInfo<v8::Value>& args) {
20 CHECK_EQ(0, args.Length());
21 args.GetReturnValue().Set(WakeEventPage::Get()->GetForContext(context()));
22}
23
24} // namespace extensions