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

Side by Side Diff: chrome/renderer/extensions/extension_custom_bindings.cc

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/extensions/extension_custom_bindings.h" 5 #include "chrome/renderer/extensions/extension_custom_bindings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 11 matching lines...) Expand all
22 #include "v8/include/v8.h" 22 #include "v8/include/v8.h"
23 23
24 namespace extensions { 24 namespace extensions {
25 25
26 namespace { 26 namespace {
27 27
28 } // namespace 28 } // namespace
29 29
30 ExtensionCustomBindings::ExtensionCustomBindings( 30 ExtensionCustomBindings::ExtensionCustomBindings(
31 Dispatcher* dispatcher, 31 Dispatcher* dispatcher,
32 v8::Handle<v8::Context> context) 32 ChromeV8Context* context)
33 : ChromeV8Extension(dispatcher, context) { 33 : ChromeV8Extension(dispatcher, context) {
34 RouteFunction("GetExtensionViews", 34 RouteFunction("GetExtensionViews",
35 base::Bind(&ExtensionCustomBindings::GetExtensionViews, 35 base::Bind(&ExtensionCustomBindings::GetExtensionViews,
36 base::Unretained(this))); 36 base::Unretained(this)));
37 } 37 }
38 38
39 v8::Handle<v8::Value> ExtensionCustomBindings::GetExtensionViews( 39 v8::Handle<v8::Value> ExtensionCustomBindings::GetExtensionViews(
40 const v8::Arguments& args) { 40 const v8::Arguments& args) {
41 if (args.Length() != 2) 41 if (args.Length() != 2)
42 return v8::Undefined(); 42 return v8::Undefined();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 v8::Local<v8::Value> window = context->Global(); 88 v8::Local<v8::Value> window = context->Global();
89 DCHECK(!window.IsEmpty()); 89 DCHECK(!window.IsEmpty());
90 v8_views->Set(v8::Integer::New(v8_index++), window); 90 v8_views->Set(v8::Integer::New(v8_index++), window);
91 } 91 }
92 } 92 }
93 93
94 return v8_views; 94 return v8_views;
95 } 95 }
96 96
97 } // namespace extensions 97 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698