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

Unified Diff: chrome/renderer/devtools_client.cc

Issue 264077: Convert devtools interfaces over to using WebString.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/devtools_client.h ('k') | webkit/glue/devtools/bound_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/devtools_client.cc
===================================================================
--- chrome/renderer/devtools_client.cc (revision 29249)
+++ chrome/renderer/devtools_client.cc (working copy)
@@ -10,8 +10,11 @@
#include "chrome/common/render_messages.h"
#include "chrome/renderer/render_thread.h"
#include "chrome/renderer/render_view.h"
+#include "webkit/api/public/WebString.h"
#include "webkit/glue/webdevtoolsclient.h"
+using WebKit::WebString;
+
DevToolsClient::DevToolsClient(RenderView* view)
: render_view_(view) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
@@ -19,7 +22,7 @@
WebDevToolsClient::Create(
view->webview(),
this,
- WideToASCII(command_line.GetSwitchValue(switches::kLang))));
+ WideToUTF16Hack(command_line.GetSwitchValue(switches::kLang))));
}
DevToolsClient::~DevToolsClient() {
@@ -43,17 +46,21 @@
return handled;
}
-void DevToolsClient::SendMessageToAgent(const std::string& class_name,
- const std::string& method_name,
- const std::string& param1,
- const std::string& param2,
- const std::string& param3) {
- Send(DevToolsAgentMsg_RpcMessage(class_name, method_name, param1, param2,
- param3));
+void DevToolsClient::SendMessageToAgent(const WebString& class_name,
+ const WebString& method_name,
+ const WebString& param1,
+ const WebString& param2,
+ const WebString& param3) {
+ Send(DevToolsAgentMsg_RpcMessage(
+ class_name.utf8(),
+ method_name.utf8(),
+ param1.utf8(),
+ param2.utf8(),
+ param3.utf8()));
}
-void DevToolsClient::SendDebuggerCommandToAgent(const std::string& command) {
- Send(DevToolsAgentMsg_DebuggerCommand(command));
+void DevToolsClient::SendDebuggerCommandToAgent(const WebString& command) {
+ Send(DevToolsAgentMsg_DebuggerCommand(command.utf8()));
}
void DevToolsClient::ActivateWindow() {
@@ -87,6 +94,10 @@
const std::string& param1,
const std::string& param2,
const std::string& param3) {
- web_tools_client_->DispatchMessageFromAgent(class_name, method_name, param1,
- param2, param3);
+ web_tools_client_->DispatchMessageFromAgent(
+ WebString::fromUTF8(class_name),
+ WebString::fromUTF8(method_name),
+ WebString::fromUTF8(param1),
+ WebString::fromUTF8(param2),
+ WebString::fromUTF8(param3));
}
« no previous file with comments | « chrome/renderer/devtools_client.h ('k') | webkit/glue/devtools/bound_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698