| 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/memory/singleton.h" | 8 #include "base/memory/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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 std::string CloudPrintSetupFlow::GetDialogArgs() const { | 181 std::string CloudPrintSetupFlow::GetDialogArgs() const { |
| 182 return dialog_start_args_; | 182 return dialog_start_args_; |
| 183 } | 183 } |
| 184 | 184 |
| 185 void CloudPrintSetupFlow::OnCloseContents(TabContents* source, | 185 void CloudPrintSetupFlow::OnCloseContents(TabContents* source, |
| 186 bool* out_close_dialog) { | 186 bool* out_close_dialog) { |
| 187 } | 187 } |
| 188 | 188 |
| 189 std::wstring CloudPrintSetupFlow::GetDialogTitle() const { | 189 string16 CloudPrintSetupFlow::GetDialogTitle() const { |
| 190 return UTF16ToWideHack( | 190 return l10n_util::GetStringUTF16(IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE); |
| 191 l10n_util::GetStringUTF16(IDS_CLOUD_PRINT_SETUP_DIALOG_TITLE)); | |
| 192 } | 191 } |
| 193 | 192 |
| 194 bool CloudPrintSetupFlow::IsDialogModal() const { | 193 bool CloudPrintSetupFlow::IsDialogModal() const { |
| 195 // We are always modeless. | 194 // We are always modeless. |
| 196 return false; | 195 return false; |
| 197 } | 196 } |
| 198 | 197 |
| 199 bool CloudPrintSetupFlow::ShouldShowDialogTitle() const { | 198 bool CloudPrintSetupFlow::ShouldShowDialogTitle() const { |
| 200 return true; | 199 return true; |
| 201 } | 200 } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 } | 331 } |
| 333 | 332 |
| 334 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( | 333 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( |
| 335 const string16& iframe_xpath, | 334 const string16& iframe_xpath, |
| 336 const string16& js) { | 335 const string16& js) { |
| 337 if (web_ui_) { | 336 if (web_ui_) { |
| 338 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); | 337 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); |
| 339 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); | 338 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); |
| 340 } | 339 } |
| 341 } | 340 } |
| OLD | NEW |