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

Unified Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 9147040: Change cloud print dialog style in Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Kill unneeded comment Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/printing/print_dialog_cloud.cc
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index daf1213cd8e18e85a72adf877a03a795178f9069..625a231f6ae223920859bc42ea8d061cf0333410 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -21,8 +21,14 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_list.h"
+#if defined(USE_AURA)
James Hawkins 2012/01/11 17:25:54 OS-specific includes go after the cross-platform i
Albert Bodenhamer 2012/01/11 18:11:44 Done.
+#include "chrome/browser/ui/browser_window.h"
+#endif
#include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#if defined(USE_AURA)
+#include "chrome/browser/ui/views/html_dialog_view.h"
+#endif
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/print_messages.h"
@@ -38,6 +44,9 @@
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(USE_AURA)
+#include "ui/views/widget/widget.h"
+#endif
#include "webkit/glue/webpreferences.h"
#include "grit/generated_resources.h"
@@ -600,8 +609,8 @@ void CreateDialogImpl(const FilePath& path_to_file,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
Browser* browser = BrowserList::GetLastActive();
- const int kDefaultWidth = 497;
- const int kDefaultHeight = 332;
+ const int kDefaultWidth = 912;
James Hawkins 2012/01/11 17:25:54 What is this change about?
Albert Bodenhamer 2012/01/11 18:11:44 The sign-in dialog has gotten much larger since th
+ const int kDefaultHeight = 633;
string16 job_title = print_job_title;
Profile* profile = NULL;
if (modal) {
@@ -640,7 +649,16 @@ void CreateDialogImpl(const FilePath& path_to_file,
file_type, modal, delete_on_close);
if (modal) {
DCHECK(browser);
+#if defined(USE_AURA)
+ HtmlDialogView* html_view =
+ new HtmlDialogView(profile, dialog_delegate);
+ views::Widget::CreateWindowWithParent(html_view,
+ browser->window()->GetNativeHandle());
+ html_view->InitDialog();
+ html_view->GetWidget()->Show();
+#else
browser->BrowserShowHtmlDialog(dialog_delegate, NULL, STYLE_GENERIC);
+#endif
} else {
browser::ShowHtmlDialog(NULL, profile, dialog_delegate, STYLE_GENERIC);
}

Powered by Google App Engine
This is Rietveld 408576698