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

Side by Side Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 4146015: Minimum UI change for Cloud Print dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test. Created 10 years, 1 month 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 | « no previous file | chrome/browser/printing/print_dialog_cloud_unittest.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/print_dialog_cloud.h" 5 #include "chrome/browser/printing/print_dialog_cloud.h"
6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h"
7 7
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 if (owns_flow_handler_) { 418 if (owns_flow_handler_) {
419 delete flow_handler_; 419 delete flow_handler_;
420 } 420 }
421 } 421 }
422 422
423 bool CloudPrintHtmlDialogDelegate::IsDialogModal() const { 423 bool CloudPrintHtmlDialogDelegate::IsDialogModal() const {
424 return true; 424 return true;
425 } 425 }
426 426
427 std::wstring CloudPrintHtmlDialogDelegate::GetDialogTitle() const { 427 std::wstring CloudPrintHtmlDialogDelegate::GetDialogTitle() const {
428 return l10n_util::GetString(IDS_CLOUD_PRINT_TITLE); 428 return std::wstring();
429 } 429 }
430 430
431 GURL CloudPrintHtmlDialogDelegate::GetDialogContentURL() const { 431 GURL CloudPrintHtmlDialogDelegate::GetDialogContentURL() const {
432 return params_.url; 432 return params_.url;
433 } 433 }
434 434
435 void CloudPrintHtmlDialogDelegate::GetDOMMessageHandlers( 435 void CloudPrintHtmlDialogDelegate::GetDOMMessageHandlers(
436 std::vector<DOMMessageHandler*>* handlers) const { 436 std::vector<DOMMessageHandler*>* handlers) const {
437 handlers->push_back(flow_handler_); 437 handlers->push_back(flow_handler_);
438 // We don't own flow_handler_ anymore, but it sticks around until at 438 // We don't own flow_handler_ anymore, but it sticks around until at
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // TODO(scottbyer): Verify GAIA login valid, execute GAIA login if not (should 490 // TODO(scottbyer): Verify GAIA login valid, execute GAIA login if not (should
491 // be distilled out of bookmark sync.) 491 // be distilled out of bookmark sync.)
492 string16 print_job_title; 492 string16 print_job_title;
493 if (browser_ && browser_->GetSelectedTabContents()) 493 if (browser_ && browser_->GetSelectedTabContents())
494 print_job_title = browser_->GetSelectedTabContents()->GetTitle(); 494 print_job_title = browser_->GetSelectedTabContents()->GetTitle();
495 495
496 // TODO(scottbyer): Get the dialog width, height from the dialog 496 // TODO(scottbyer): Get the dialog width, height from the dialog
497 // contents, and take the screen size into account. 497 // contents, and take the screen size into account.
498 HtmlDialogUIDelegate* dialog_delegate = 498 HtmlDialogUIDelegate* dialog_delegate =
499 new internal_cloud_print_helpers::CloudPrintHtmlDialogDelegate( 499 new internal_cloud_print_helpers::CloudPrintHtmlDialogDelegate(
500 path_to_pdf, 500, 400, std::string(), print_job_title); 500 path_to_pdf, 497, 354, std::string(), print_job_title);
501 browser_->BrowserShowHtmlDialog(dialog_delegate, NULL); 501 browser_->BrowserShowHtmlDialog(dialog_delegate, NULL);
502 } 502 }
503 503
504 PrintDialogCloud::~PrintDialogCloud() { 504 PrintDialogCloud::~PrintDialogCloud() {
505 } 505 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/print_dialog_cloud_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698