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

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

Issue 753523002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/tabs_custom_bindings.h" 5 #include "chrome/renderer/extensions/tabs_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 "content/public/renderer/render_view.h" 10 #include "content/public/renderer/render_view.h"
(...skipping 14 matching lines...) Expand all
25 const v8::FunctionCallbackInfo<v8::Value>& args) { 25 const v8::FunctionCallbackInfo<v8::Value>& args) {
26 // Get the current RenderView so that we can send a routed IPC message from 26 // Get the current RenderView so that we can send a routed IPC message from
27 // the correct source. 27 // the correct source.
28 content::RenderView* renderview = context()->GetRenderView(); 28 content::RenderView* renderview = context()->GetRenderView();
29 if (!renderview) 29 if (!renderview)
30 return; 30 return;
31 31
32 if (args.Length() >= 3 && args[0]->IsInt32() && args[1]->IsString() && 32 if (args.Length() >= 3 && args[0]->IsInt32() && args[1]->IsString() &&
33 args[2]->IsString()) { 33 args[2]->IsString()) {
34 int tab_id = args[0]->Int32Value(); 34 int tab_id = args[0]->Int32Value();
35 std::string extension_id = *v8::String::Utf8Value(args[1]->ToString()); 35 std::string extension_id = *v8::String::Utf8Value(args[1]);
36 std::string channel_name = *v8::String::Utf8Value(args[2]->ToString()); 36 std::string channel_name = *v8::String::Utf8Value(args[2]);
37 int port_id = -1; 37 int port_id = -1;
38 renderview->Send(new ExtensionHostMsg_OpenChannelToTab( 38 renderview->Send(new ExtensionHostMsg_OpenChannelToTab(
39 renderview->GetRoutingID(), tab_id, extension_id, channel_name, 39 renderview->GetRoutingID(), tab_id, extension_id, channel_name,
40 &port_id)); 40 &port_id));
41 args.GetReturnValue().Set(static_cast<int32_t>(port_id)); 41 args.GetReturnValue().Set(static_cast<int32_t>(port_id));
42 return; 42 return;
43 } 43 }
44 } 44 }
45 45
46 } // namespace extensions 46 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | components/translate/content/renderer/translate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698