Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: extensions/renderer/console.cc

Issue 240603003: Remove ChromeV8Extension & most of ChromeV8Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 22 matching lines...) Expand all
33 return finder.found_; 33 return finder.found_;
34 } 34 }
35 35
36 private: 36 private:
37 explicit ByContextFinder(v8::Handle<v8::Context> context) 37 explicit ByContextFinder(v8::Handle<v8::Context> context)
38 : context_(context), found_(NULL) {} 38 : context_(context), found_(NULL) {}
39 39
40 virtual bool Visit(content::RenderView* render_view) OVERRIDE { 40 virtual bool Visit(content::RenderView* render_view) OVERRIDE {
41 ExtensionHelper* helper = ExtensionHelper::Get(render_view); 41 ExtensionHelper* helper = ExtensionHelper::Get(render_view);
42 if (helper && 42 if (helper &&
43 helper->dispatcher()->v8_context_set().GetByV8Context(context_)) { 43 helper->dispatcher()->script_context_set().GetByV8Context(context_)) {
44 found_ = render_view; 44 found_ = render_view;
45 } 45 }
46 return !found_; 46 return !found_;
47 } 47 }
48 48
49 v8::Handle<v8::Context> context_; 49 v8::Handle<v8::Context> context_;
50 content::RenderView* found_; 50 content::RenderView* found_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(ByContextFinder); 52 DISALLOW_COPY_AND_ASSIGN(ByContextFinder);
53 }; 53 };
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 v8::Local<v8::Object> console_object = v8::Object::New(isolate); 179 v8::Local<v8::Object> console_object = v8::Object::New(isolate);
180 BindLogMethod(isolate, console_object, "debug", &Debug); 180 BindLogMethod(isolate, console_object, "debug", &Debug);
181 BindLogMethod(isolate, console_object, "log", &Log); 181 BindLogMethod(isolate, console_object, "log", &Log);
182 BindLogMethod(isolate, console_object, "warn", &Warn); 182 BindLogMethod(isolate, console_object, "warn", &Warn);
183 BindLogMethod(isolate, console_object, "error", &Error); 183 BindLogMethod(isolate, console_object, "error", &Error);
184 return handle_scope.Escape(console_object); 184 return handle_scope.Escape(console_object);
185 } 185 }
186 186
187 } // namespace console 187 } // namespace console
188 } // namespace extensions 188 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698