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

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

Issue 10353007: Extract a minimal subset of WebDialogUI/WebDialogDelegate from src/chrome -> src/ui/web_dialogs Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 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/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 "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 676 }
677 if (!pref_service->FindPreference(prefs::kCloudPrintDialogHeight)) { 677 if (!pref_service->FindPreference(prefs::kCloudPrintDialogHeight)) {
678 pref_service->RegisterIntegerPref(prefs::kCloudPrintDialogHeight, 678 pref_service->RegisterIntegerPref(prefs::kCloudPrintDialogHeight,
679 kDefaultHeight, 679 kDefaultHeight,
680 PrefService::UNSYNCABLE_PREF); 680 PrefService::UNSYNCABLE_PREF);
681 } 681 }
682 682
683 int width = pref_service->GetInteger(prefs::kCloudPrintDialogWidth); 683 int width = pref_service->GetInteger(prefs::kCloudPrintDialogWidth);
684 int height = pref_service->GetInteger(prefs::kCloudPrintDialogHeight); 684 int height = pref_service->GetInteger(prefs::kCloudPrintDialogHeight);
685 685
686 WebDialogDelegate* dialog_delegate = 686 web_dialogs::WebDialogDelegate* dialog_delegate =
687 new internal_cloud_print_helpers::CloudPrintWebDialogDelegate( 687 new internal_cloud_print_helpers::CloudPrintWebDialogDelegate(
688 path_to_file, width, height, std::string(), job_title, print_ticket, 688 path_to_file, width, height, std::string(), job_title, print_ticket,
689 file_type, modal, delete_on_close, close_after_signin, 689 file_type, modal, delete_on_close, close_after_signin,
690 callback); 690 callback);
691 browser::ShowWebDialog(modal ? browser->window()->GetNativeHandle() : NULL, 691 browser::ShowWebDialog(modal ? browser->window()->GetNativeHandle() : NULL,
692 profile, browser, dialog_delegate); 692 profile, browser, dialog_delegate);
693 } 693 }
694 694
695 void CreateDialogSigninImpl(const base::Closure& callback) { 695 void CreateDialogSigninImpl(const base::Closure& callback) {
696 CreateDialogImpl(FilePath(), string16(), string16(), std::string(), 696 CreateDialogImpl(FilePath(), string16(), string16(), std::string(),
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 file_type, 799 file_type,
800 false, 800 false,
801 delete_on_close); 801 delete_on_close);
802 return true; 802 return true;
803 } 803 }
804 } 804 }
805 return false; 805 return false;
806 } 806 }
807 807
808 } // end namespace 808 } // end namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698