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

Side by Side Diff: chrome/renderer/extensions/api_definitions_natives.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/api_definitions_natives.h" 5 #include "chrome/renderer/extensions/api_definitions_natives.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/common/extensions/api/extension_api.h" 9 #include "chrome/common/extensions/api/extension_api.h"
10 10
11 namespace { 11 namespace {
12 const char kInvalidExtensionNamespace[] = "Invalid extension namespace"; 12 const char kInvalidExtensionNamespace[] = "Invalid extension namespace";
13 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 ApiDefinitionsNatives::ApiDefinitionsNatives(Dispatcher* dispatcher, 17 ApiDefinitionsNatives::ApiDefinitionsNatives(Dispatcher* dispatcher,
18 ChromeV8Context* context) 18 ChromeV8Context* context)
19 : ChromeV8Extension(dispatcher, context->v8_context()), 19 : ChromeV8Extension(dispatcher, context) {
20 context_(context) {
21 RouteFunction("GetExtensionAPIDefinitions", 20 RouteFunction("GetExtensionAPIDefinitions",
22 base::Bind(&ApiDefinitionsNatives::GetExtensionAPIDefinitions, 21 base::Bind(&ApiDefinitionsNatives::GetExtensionAPIDefinitions,
23 base::Unretained(this))); 22 base::Unretained(this)));
24 } 23 }
25 24
26 v8::Handle<v8::Value> ApiDefinitionsNatives::GetExtensionAPIDefinitions( 25 v8::Handle<v8::Value> ApiDefinitionsNatives::GetExtensionAPIDefinitions(
27 const v8::Arguments& args) { 26 const v8::Arguments& args) {
28 return dispatcher()->v8_schema_registry()->GetSchemas( 27 return dispatcher()->v8_schema_registry()->GetSchemas(
29 ExtensionAPI::GetSharedInstance()->GetAllAPINames()); 28 ExtensionAPI::GetSharedInstance()->GetAllAPINames());
30 } 29 }
31 30
32 } // namespace extensions 31 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698