| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/renderer/console.h" | 5 #include "extensions/renderer/console.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/macros.h" |
| 10 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 11 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 13 #include "content/public/renderer/render_frame.h" | 14 #include "content/public/renderer/render_frame.h" |
| 14 #include "extensions/renderer/extension_frame_helper.h" | 15 #include "extensions/renderer/extension_frame_helper.h" |
| 15 #include "extensions/renderer/script_context.h" | 16 #include "extensions/renderer/script_context.h" |
| 16 #include "extensions/renderer/script_context_set.h" | 17 #include "extensions/renderer/script_context_set.h" |
| 17 #include "extensions/renderer/v8_helpers.h" | 18 #include "extensions/renderer/v8_helpers.h" |
| 18 | 19 |
| 19 namespace extensions { | 20 namespace extensions { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 v8::Local<v8::Object> console_object = v8::Object::New(isolate); | 118 v8::Local<v8::Object> console_object = v8::Object::New(isolate); |
| 118 BindLogMethod(isolate, console_object, "debug", &Debug); | 119 BindLogMethod(isolate, console_object, "debug", &Debug); |
| 119 BindLogMethod(isolate, console_object, "log", &Log); | 120 BindLogMethod(isolate, console_object, "log", &Log); |
| 120 BindLogMethod(isolate, console_object, "warn", &Warn); | 121 BindLogMethod(isolate, console_object, "warn", &Warn); |
| 121 BindLogMethod(isolate, console_object, "error", &Error); | 122 BindLogMethod(isolate, console_object, "error", &Error); |
| 122 return handle_scope.Escape(console_object); | 123 return handle_scope.Escape(console_object); |
| 123 } | 124 } |
| 124 | 125 |
| 125 } // namespace console | 126 } // namespace console |
| 126 } // namespace extensions | 127 } // namespace extensions |
| OLD | NEW |