Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/ui/webui/cloud_print_signin_dialog.h" | 5 #include "chrome/browser/ui/webui/cloud_print_signin_dialog.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
| 12 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" | 12 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_list.h" | 15 #include "chrome/browser/ui/browser_list.h" |
| 16 #include "chrome/browser/ui/dialog_style.h" | |
| 16 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 17 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
| 17 #include "chrome/browser/ui/webui/print_preview_ui.h" | 18 #include "chrome/browser/ui/webui/print_preview_ui.h" |
| 18 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 19 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
| 20 #include "content/browser/renderer_host/render_view_host.h" | 21 #include "content/browser/renderer_host/render_view_host.h" |
| 21 #include "content/browser/tab_contents/navigation_controller.h" | 22 #include "content/browser/tab_contents/navigation_controller.h" |
| 22 #include "content/browser/tab_contents/tab_contents.h" | 23 #include "content/browser/tab_contents/tab_contents.h" |
| 23 #include "content/browser/tab_contents/tab_contents_view.h" | 24 #include "content/browser/tab_contents/tab_contents_view.h" |
| 24 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
| 25 #include "content/public/browser/notification_source.h" | 26 #include "content/public/browser/notification_source.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 173 } | 174 } |
| 174 | 175 |
| 175 bool CloudPrintSigninDelegate::ShouldShowDialogTitle() const { | 176 bool CloudPrintSigninDelegate::ShouldShowDialogTitle() const { |
| 176 return false; | 177 return false; |
| 177 } | 178 } |
| 178 | 179 |
| 179 void CreateCloudPrintSigninDialogImpl(TabContents* parent_tab) { | 180 void CreateCloudPrintSigninDialogImpl(TabContents* parent_tab) { |
| 180 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 181 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 181 HtmlDialogUIDelegate* dialog_delegate = | 182 HtmlDialogUIDelegate* dialog_delegate = |
| 182 new CloudPrintSigninDelegate(parent_tab); | 183 new CloudPrintSigninDelegate(parent_tab); |
| 183 BrowserList::GetLastActive()->BrowserShowHtmlDialog(dialog_delegate, NULL); | 184 BrowserList::GetLastActive()->BrowserShowHtmlDialog(dialog_delegate, NULL, |
| 185 STYLE_GENERIC); | |
|
flackr
2011/11/21 20:43:31
One argument per line.
bshe
2011/11/22 16:26:24
Done.
| |
| 184 } | 186 } |
| 185 | 187 |
| 186 void CreateCloudPrintSigninDialog(TabContents* parent_tab) { | 188 void CreateCloudPrintSigninDialog(TabContents* parent_tab) { |
| 187 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 188 | 190 |
| 189 BrowserThread::PostTask( | 191 BrowserThread::PostTask( |
| 190 BrowserThread::UI, FROM_HERE, | 192 BrowserThread::UI, FROM_HERE, |
| 191 base::Bind(&CreateCloudPrintSigninDialogImpl, parent_tab)); | 193 base::Bind(&CreateCloudPrintSigninDialogImpl, parent_tab)); |
| 192 } | 194 } |
| 193 } // namespace cloud_print_signin_dialog | 195 } // namespace cloud_print_signin_dialog |
| OLD | NEW |