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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 authenticator_->StartClientLogin(user, password, 254 authenticator_->StartClientLogin(user, password,
255 GaiaConstants::kCloudPrintService, 255 GaiaConstants::kCloudPrintService,
256 last_auth_error_.captcha().token, captcha, 256 last_auth_error_.captcha().token, captcha,
257 GaiaAuthFetcher::HostedAccountsAllowed); 257 GaiaAuthFetcher::HostedAccountsAllowed);
258 } 258 }
259 } 259 }
260 260
261 void CloudPrintSetupFlow::OnUserClickedLearnMore() { 261 void CloudPrintSetupFlow::OnUserClickedLearnMore() {
262 web_ui_->tab_contents()->OpenURL(CloudPrintURL::GetCloudPrintLearnMoreURL(), 262 web_ui_->tab_contents()->OpenURL(CloudPrintURL::GetCloudPrintLearnMoreURL(),
263 GURL(), NEW_FOREGROUND_TAB, 263 GURL(), NEW_FOREGROUND_TAB,
264 PageTransition::LINK); 264 content::PAGE_TRANSITION_LINK);
265 } 265 }
266 266
267 void CloudPrintSetupFlow::OnUserClickedPrintTestPage() { 267 void CloudPrintSetupFlow::OnUserClickedPrintTestPage() {
268 web_ui_->tab_contents()->OpenURL(CloudPrintURL::GetCloudPrintTestPageURL(), 268 web_ui_->tab_contents()->OpenURL(CloudPrintURL::GetCloudPrintTestPageURL(),
269 GURL(), NEW_FOREGROUND_TAB, 269 GURL(), NEW_FOREGROUND_TAB,
270 PageTransition::LINK); 270 content::PAGE_TRANSITION_LINK);
271 } 271 }
272 272
273 /////////////////////////////////////////////////////////////////////////////// 273 ///////////////////////////////////////////////////////////////////////////////
274 // Helper methods for showing contents of the Web UI 274 // Helper methods for showing contents of the Web UI
275 void CloudPrintSetupFlow::ShowGaiaLogin(const DictionaryValue& args) { 275 void CloudPrintSetupFlow::ShowGaiaLogin(const DictionaryValue& args) {
276 if (web_ui_) 276 if (web_ui_)
277 web_ui_->CallJavascriptFunction("cloudprint.showSetupLogin"); 277 web_ui_->CallJavascriptFunction("cloudprint.showSetupLogin");
278 278
279 std::string json; 279 std::string json;
280 base::JSONWriter::Write(&args, false, &json); 280 base::JSONWriter::Write(&args, false, &json);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 331
332 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame( 332 void CloudPrintSetupFlow::ExecuteJavascriptInIFrame(
333 const string16& iframe_xpath, 333 const string16& iframe_xpath,
334 const string16& js) { 334 const string16& js) {
335 if (web_ui_) { 335 if (web_ui_) {
336 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host(); 336 RenderViewHost* rvh = web_ui_->tab_contents()->render_view_host();
337 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); 337 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js);
338 } 338 }
339 } 339 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/printing/print_preview_tab_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698