| 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/remoting/remoting_setup_flow.h" | 5 #include "chrome/browser/remoting/remoting_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 } | 95 } |
| 96 | 96 |
| 97 RemotingSetupFlow::RemotingSetupFlow(const std::string& args, Profile* profile) | 97 RemotingSetupFlow::RemotingSetupFlow(const std::string& args, Profile* profile) |
| 98 : dom_ui_(NULL), | 98 : dom_ui_(NULL), |
| 99 dialog_start_args_(args), | 99 dialog_start_args_(args), |
| 100 profile_(profile), | 100 profile_(profile), |
| 101 process_control_(NULL) { | 101 process_control_(NULL) { |
| 102 // TODO(hclam): The data source should be added once. | 102 // TODO(hclam): The data source should be added once. |
| 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 RemotingResourcesSource()))); | 107 make_scoped_refptr(new RemotingResourcesSource()))); |
| 108 } | 108 } |
| 109 | 109 |
| 110 RemotingSetupFlow::~RemotingSetupFlow() { | 110 RemotingSetupFlow::~RemotingSetupFlow() { |
| 111 } | 111 } |
| 112 | 112 |
| 113 void RemotingSetupFlow::Focus() { | 113 void RemotingSetupFlow::Focus() { |
| 114 // TODO(pranavk): implement this method. | 114 // TODO(pranavk): implement this method. |
| 115 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 309 } |
| 310 | 310 |
| 311 void RemotingSetupFlow::ExecuteJavascriptInIFrame( | 311 void RemotingSetupFlow::ExecuteJavascriptInIFrame( |
| 312 const std::wstring& iframe_xpath, | 312 const std::wstring& iframe_xpath, |
| 313 const std::wstring& js) { | 313 const std::wstring& js) { |
| 314 if (dom_ui_) { | 314 if (dom_ui_) { |
| 315 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); | 315 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); |
| 316 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); | 316 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); |
| 317 } | 317 } |
| 318 } | 318 } |
| OLD | NEW |