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/pepper_request_natives.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/pepper_request_natives.h" 5 #include "chrome/renderer/extensions/pepper_request_natives.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/renderer/extensions/chrome_v8_context.h" 11 #include "chrome/renderer/extensions/chrome_v8_context.h"
12 #include "content/public/renderer/v8_value_converter.h" 12 #include "content/public/renderer/v8_value_converter.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 PepperRequestNatives::PepperRequestNatives(ChromeV8Context* context) 16 PepperRequestNatives::PepperRequestNatives(ScriptContext* context)
17 : ObjectBackedNativeHandler(context) { 17 : ObjectBackedNativeHandler(context) {
18 RouteFunction( 18 RouteFunction(
19 "SendResponse", 19 "SendResponse",
20 base::Bind(&PepperRequestNatives::SendResponse, base::Unretained(this))); 20 base::Bind(&PepperRequestNatives::SendResponse, base::Unretained(this)));
21 } 21 }
22 22
23 void PepperRequestNatives::SendResponse( 23 void PepperRequestNatives::SendResponse(
24 const v8::FunctionCallbackInfo<v8::Value>& args) { 24 const v8::FunctionCallbackInfo<v8::Value>& args) {
25 DCHECK_EQ(3, args.Length()); 25 DCHECK_EQ(3, args.Length());
26 DCHECK(args[0]->IsInt32()); 26 DCHECK(args[0]->IsInt32());
(...skipping 14 matching lines...) Expand all
41 scoped_ptr<const base::Value> result( 41 scoped_ptr<const base::Value> result(
42 converter->FromV8Value(args[1], chrome_context->v8_context())); 42 converter->FromV8Value(args[1], chrome_context->v8_context()));
43 DCHECK(result); 43 DCHECK(result);
44 const base::ListValue* result_list = NULL; 44 const base::ListValue* result_list = NULL;
45 CHECK(result->GetAsList(&result_list)); 45 CHECK(result->GetAsList(&result_list));
46 chrome_context->pepper_request_proxy()->OnResponseReceived( 46 chrome_context->pepper_request_proxy()->OnResponseReceived(
47 request_id, true, *result_list, ""); 47 request_id, true, *result_list, "");
48 } 48 }
49 49
50 } // namespace extensions 50 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698