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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc

Issue 11885021: Don't derive from ChromeURLDataManager::DataSource, and instead have these classes implement a dele… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix WebUISourcesTest unittest Created 7 years, 11 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const base::WeakPtr<Delegate>& delegate, 97 const base::WeakPtr<Delegate>& delegate,
98 bool setup_done) 98 bool setup_done)
99 : web_ui_(NULL), 99 : web_ui_(NULL),
100 dialog_start_args_(args), 100 dialog_start_args_(args),
101 last_auth_error_(GoogleServiceAuthError::None()), 101 last_auth_error_(GoogleServiceAuthError::None()),
102 setup_done_(setup_done), 102 setup_done_(setup_done),
103 process_control_(NULL), 103 process_control_(NULL),
104 delegate_(delegate) { 104 delegate_(delegate) {
105 // TODO(hclam): The data source should be added once. 105 // TODO(hclam): The data source should be added once.
106 profile_ = profile; 106 profile_ = profile;
107 ChromeURLDataManager::AddDataSource(profile, 107 ChromeURLDataManager::AddDataSource(profile, new CloudPrintSetupSource);
108 new CloudPrintSetupSource());
109 } 108 }
110 109
111 CloudPrintSetupFlow::~CloudPrintSetupFlow() { 110 CloudPrintSetupFlow::~CloudPrintSetupFlow() {
112 } 111 }
113 112
114 void CloudPrintSetupFlow::Focus() { 113 void CloudPrintSetupFlow::Focus() {
115 // TODO(pranavk): implement this method. 114 // TODO(pranavk): implement this method.
116 NOTIMPLEMENTED(); 115 NOTIMPLEMENTED();
117 } 116 }
118 117
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 334
336 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( 335 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame(
337 const string16& iframe_xpath, 336 const string16& iframe_xpath,
338 const string16& js) { 337 const string16& js) {
339 if (web_ui_) { 338 if (web_ui_) {
340 content::RenderViewHost* rvh = 339 content::RenderViewHost* rvh =
341 web_ui_->GetWebContents()->GetRenderViewHost(); 340 web_ui_->GetWebContents()->GetRenderViewHost();
342 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); 341 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js);
343 } 342 }
344 } 343 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698