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

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

Issue 1336993002: Straighten up includes of host_desktop.h/host_desktop_type.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host_desktop_type
Patch Set: Build fixes for Windows and Mac Created 5 years, 3 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
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_error_dialog.h" 5 #include "chrome/browser/printing/print_error_dialog.h"
6 6
7 #include "chrome/browser/ui/browser_finder.h" 7 #include "chrome/browser/ui/browser_finder.h"
8 #include "chrome/browser/ui/browser_window.h" 8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/browser/ui/host_desktop.h"
9 #include "chrome/browser/ui/simple_message_box.h" 10 #include "chrome/browser/ui/simple_message_box.h"
10 #include "chrome/grit/generated_resources.h" 11 #include "chrome/grit/generated_resources.h"
11 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 14
14 namespace chrome { 15 namespace chrome {
15 16
16 namespace { 17 namespace {
17 18
18 void ShowPrintErrorDialogTask() { 19 void ShowPrintErrorDialogTask() {
19 Browser* browser = chrome::FindLastActiveWithHostDesktopType( 20 Browser* browser = chrome::FindLastActiveWithHostDesktopType(
20 chrome::GetActiveDesktop()); 21 chrome::GetActiveDesktop());
21 ShowMessageBox(browser ? browser->window()->GetNativeWindow() : NULL, 22 ShowMessageBox(browser ? browser->window()->GetNativeWindow() : NULL,
22 l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_TITLE_TEXT), 23 l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_TITLE_TEXT),
23 l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT), 24 l10n_util::GetStringUTF16(IDS_PRINT_SPOOL_FAILED_ERROR_TEXT),
24 MESSAGE_BOX_TYPE_WARNING); 25 MESSAGE_BOX_TYPE_WARNING);
25 } 26 }
26 27
27 } // namespace 28 } // namespace
28 29
29 void ShowPrintErrorDialog() { 30 void ShowPrintErrorDialog() {
30 // Nested loop may destroy caller. 31 // Nested loop may destroy caller.
31 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 32 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
32 base::Bind(&ShowPrintErrorDialogTask)); 33 base::Bind(&ShowPrintErrorDialogTask));
33 } 34 }
34 35
35 } // namespace chrome 36 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_dialog_cloud_win.cc ('k') | chrome/browser/printing/print_preview_dialog_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698