OLD | NEW |
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/printing/cloud_print/cloud_print_setup_flow.h" | 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/singleton.h" | 8 #include "base/singleton.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 | 285 |
286 ExecuteJavascriptInIFrame(kDoneIframeXPath, L"cloudprint.onPageShown();"); | 286 ExecuteJavascriptInIFrame(kDoneIframeXPath, L"cloudprint.onPageShown();"); |
287 } | 287 } |
288 | 288 |
289 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( | 289 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( |
290 const std::wstring& iframe_xpath, | 290 const std::wstring& iframe_xpath, |
291 const std::wstring& js) { | 291 const std::wstring& js) { |
292 if (dom_ui_) { | 292 if (dom_ui_) { |
293 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); | 293 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); |
294 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); | 294 rvh->ExecuteJavascriptInWebFrame(WideToUTF16Hack(iframe_xpath), |
| 295 WideToUTF16Hack(js)); |
295 } | 296 } |
296 } | 297 } |
OLD | NEW |