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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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) 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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698