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

Side by Side Diff: chrome/browser/remoting/setup_flow.cc

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/remoting/setup_flow.h" 5 #include "chrome/browser/remoting/setup_flow.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 DCHECK(done_); 48 DCHECK(done_);
49 return next_step_; 49 return next_step_;
50 } 50 }
51 51
52 void SetupFlowStepBase::ExecuteJavascriptInIFrame( 52 void SetupFlowStepBase::ExecuteJavascriptInIFrame(
53 const std::wstring& iframe_xpath, const std::wstring& js) { 53 const std::wstring& iframe_xpath, const std::wstring& js) {
54 DOMUI* dom_ui = flow()->dom_ui(); 54 DOMUI* dom_ui = flow()->dom_ui();
55 DCHECK(dom_ui); 55 DCHECK(dom_ui);
56 56
57 RenderViewHost* rvh = dom_ui->tab_contents()->render_view_host(); 57 RenderViewHost* rvh = dom_ui->tab_contents()->render_view_host();
58 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); 58 rvh->ExecuteJavascriptInWebFrame(WideToUTF16Hack(iframe_xpath),
59 WideToUTF16Hack(js));
59 } 60 }
60 61
61 void SetupFlowStepBase::FinishStep(SetupFlowStep* next_step) { 62 void SetupFlowStepBase::FinishStep(SetupFlowStep* next_step) {
62 next_step_ = next_step; 63 next_step_ = next_step;
63 done_ = true; 64 done_ = true;
64 done_callback_->Run(); 65 done_callback_->Run();
65 } 66 }
66 67
67 SetupFlowErrorStepBase::SetupFlowErrorStepBase() { } 68 SetupFlowErrorStepBase::SetupFlowErrorStepBase() { }
68 SetupFlowErrorStepBase::~SetupFlowErrorStepBase() { } 69 SetupFlowErrorStepBase::~SetupFlowErrorStepBase() { }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 BrowserThread::PostTask( 260 BrowserThread::PostTask(
260 BrowserThread::UI, FROM_HERE, 261 BrowserThread::UI, FROM_HERE,
261 new DeleteTask<SetupFlowStep>(current_step_.release())); 262 new DeleteTask<SetupFlowStep>(current_step_.release()));
262 } 263 }
263 264
264 current_step_.reset(next_step); 265 current_step_.reset(next_step);
265 StartCurrentStep(); 266 StartCurrentStep();
266 } 267 }
267 268
268 } // namespace remoting 269 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698