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

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

Issue 10821133: Move c/r/extensions/* into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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
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/send_request_natives.h" 5 #include "chrome/renderer/extensions/send_request_natives.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "content/public/renderer/v8_value_converter.h" 8 #include "content/public/renderer/v8_value_converter.h"
9 #include "chrome/renderer/extensions/extension_request_sender.h" 9 #include "chrome/renderer/extensions/request_sender.h"
10 10
11 using content::V8ValueConverter; 11 using content::V8ValueConverter;
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 SendRequestNatives::SendRequestNatives( 15 SendRequestNatives::SendRequestNatives(Dispatcher* dispatcher,
16 ExtensionDispatcher* extension_dispatcher, 16 RequestSender* request_sender)
17 ExtensionRequestSender* request_sender) 17 : ChromeV8Extension(dispatcher), request_sender_(request_sender) {
18 : ChromeV8Extension(extension_dispatcher),
19 request_sender_(request_sender) {
20 RouteFunction("GetNextRequestId", 18 RouteFunction("GetNextRequestId",
21 base::Bind(&SendRequestNatives::GetNextRequestId, 19 base::Bind(&SendRequestNatives::GetNextRequestId,
22 base::Unretained(this))); 20 base::Unretained(this)));
23 RouteFunction("StartRequest", 21 RouteFunction("StartRequest",
24 base::Bind(&SendRequestNatives::StartRequest, 22 base::Bind(&SendRequestNatives::StartRequest,
25 base::Unretained(this))); 23 base::Unretained(this)));
26 } 24 }
27 25
28 v8::Handle<v8::Value> SendRequestNatives::GetNextRequestId( 26 v8::Handle<v8::Value> SendRequestNatives::GetNextRequestId(
29 const v8::Arguments& args) { 27 const v8::Arguments& args) {
(...skipping 24 matching lines...) Expand all
54 NOTREACHED() << "Unable to convert args passed to StartRequest"; 52 NOTREACHED() << "Unable to convert args passed to StartRequest";
55 return v8::Undefined(); 53 return v8::Undefined();
56 } 54 }
57 55
58 request_sender_->StartRequest(name, request_id, has_callback, for_io_thread, 56 request_sender_->StartRequest(name, request_id, has_callback, for_io_thread,
59 static_cast<ListValue*>(value_args.get())); 57 static_cast<ListValue*>(value_args.get()));
60 return v8::Undefined(); 58 return v8::Undefined();
61 } 59 }
62 60
63 } // namespace extensions 61 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/send_request_natives.h ('k') | chrome/renderer/extensions/set_icon_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698