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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_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
« no previous file with comments | « chrome/browser/oom_priority_manager.cc ('k') | chrome/browser/remoting/remoting_setup_flow.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/oom_priority_manager.cc ('k') | chrome/browser/remoting/remoting_setup_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698