Standardize usage of virtual/override/final specifiers.
[chromium-blink-merge.git] / extensions / renderer / print_native_handler.cc
blob1e83b0e5b9529031fc61cf9940109c6f9a0858c6
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.
5 #include "extensions/renderer/print_native_handler.h"
7 #include <string>
9 #include "base/bind.h"
10 #include "base/strings/string_util.h"
12 namespace extensions {
14 PrintNativeHandler::PrintNativeHandler(ScriptContext* context)
15 : ObjectBackedNativeHandler(context) {
16 RouteFunction("Print",
17 base::Bind(&PrintNativeHandler::Print, base::Unretained(this)));
20 void PrintNativeHandler::Print(
21 const v8::FunctionCallbackInfo<v8::Value>& args) {
22 if (args.Length() < 1)
23 return;
25 std::vector<std::string> components;
26 for (int i = 0; i < args.Length(); ++i)
27 components.push_back(*v8::String::Utf8Value(args[i]->ToString()));
29 LOG(ERROR) << JoinString(components, ',');
32 } // namespace extensions