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

Side by Side Diff: chrome/browser/ui/profile_error_dialog.cc

Issue 7601014: browser: Abstract message box dialog functions into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile on linux_view? Created 9 years, 4 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) 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/profile_error_dialog.h" 5 #include "chrome/browser/ui/profile_error_dialog.h"
6 6
7 #include "chrome/browser/platform_util.h" 7 #include "chrome/browser/simple_message_box.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
11 #include "grit/chromium_strings.h" 11 #include "grit/chromium_strings.h"
12 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
14 14
15 void ShowProfileErrorDialog(int message_id) { 15 void ShowProfileErrorDialog(int message_id) {
16 // Parent the dialog to the current browser. During startup there may be no 16 // Parent the dialog to the current browser. During startup there may be no
17 // browser. 17 // browser.
18 Browser* browser = BrowserList::GetLastActive(); 18 Browser* browser = BrowserList::GetLastActive();
19 platform_util::SimpleErrorBox( 19 browser::ShowErrorBox(
20 browser ? browser->window()->GetNativeHandle() : NULL, 20 browser ? browser->window()->GetNativeHandle() : NULL,
21 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 21 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
22 l10n_util::GetStringUTF16(message_id)); 22 l10n_util::GetStringUTF16(message_id));
23 } 23 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/simple_message_box_gtk.cc ('k') | chrome/browser/ui/tests/browser_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698