| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/gfx/font_util.h" | 7 #include "app/gfx/font_util.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/singleton.h" | 9 #include "base/singleton.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 bool setup_done) | 95 bool setup_done) |
| 96 : dom_ui_(NULL), | 96 : dom_ui_(NULL), |
| 97 dialog_start_args_(args), | 97 dialog_start_args_(args), |
| 98 setup_done_(setup_done), | 98 setup_done_(setup_done), |
| 99 process_control_(NULL), | 99 process_control_(NULL), |
| 100 delegate_(delegate) { | 100 delegate_(delegate) { |
| 101 // TODO(hclam): The data source should be added once. | 101 // TODO(hclam): The data source should be added once. |
| 102 profile_ = profile; | 102 profile_ = profile; |
| 103 BrowserThread::PostTask( | 103 BrowserThread::PostTask( |
| 104 BrowserThread::IO, FROM_HERE, | 104 BrowserThread::IO, FROM_HERE, |
| 105 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), | 105 NewRunnableMethod(ChromeURLDataManager::GetInstance(), |
| 106 &ChromeURLDataManager::AddDataSource, | 106 &ChromeURLDataManager::AddDataSource, |
| 107 make_scoped_refptr(new CloudPrintSetupSource()))); | 107 make_scoped_refptr(new CloudPrintSetupSource()))); |
| 108 } | 108 } |
| 109 | 109 |
| 110 CloudPrintSetupFlow::~CloudPrintSetupFlow() { | 110 CloudPrintSetupFlow::~CloudPrintSetupFlow() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 void CloudPrintSetupFlow::Focus() { | 113 void CloudPrintSetupFlow::Focus() { |
| 114 // TODO(pranavk): implement this method. | 114 // TODO(pranavk): implement this method. |
| 115 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 } | 293 } |
| 294 | 294 |
| 295 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( | 295 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( |
| 296 const std::wstring& iframe_xpath, | 296 const std::wstring& iframe_xpath, |
| 297 const std::wstring& js) { | 297 const std::wstring& js) { |
| 298 if (dom_ui_) { | 298 if (dom_ui_) { |
| 299 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); | 299 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); |
| 300 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); | 300 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); |
| 301 } | 301 } |
| 302 } | 302 } |
| OLD | NEW |