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

Side by Side Diff: chrome/browser/ui/views/restart_message_box.cc

Issue 8553001: views: Add an Options enum to MessageBoxView control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding an IPC_MESSAGE_EXPORT to line 30 of param_traits_macro.h makes it link in shared build Created 9 years 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/views/restart_message_box.h" 5 #include "chrome/browser/ui/views/restart_message_box.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/chromium_strings.h" 8 #include "grit/chromium_strings.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/base/message_box_flags.h"
12 #include "ui/views/controls/message_box_view.h" 11 #include "ui/views/controls/message_box_view.h"
13 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
14 13
15 //////////////////////////////////////////////////////////////////////////////// 14 ////////////////////////////////////////////////////////////////////////////////
16 // RestartMessageBox, public: 15 // RestartMessageBox, public:
17 16
18 // static 17 // static
19 void RestartMessageBox::ShowMessageBox(gfx::NativeWindow parent_window) { 18 void RestartMessageBox::ShowMessageBox(gfx::NativeWindow parent_window) {
20 // When the window closes, it will delete itself. 19 // When the window closes, it will delete itself.
21 new RestartMessageBox(parent_window); 20 new RestartMessageBox(parent_window);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return message_box_view_->GetWidget(); 54 return message_box_view_->GetWidget();
56 } 55 }
57 56
58 //////////////////////////////////////////////////////////////////////////////// 57 ////////////////////////////////////////////////////////////////////////////////
59 // RestartMessageBox, private: 58 // RestartMessageBox, private:
60 59
61 RestartMessageBox::RestartMessageBox(gfx::NativeWindow parent_window) { 60 RestartMessageBox::RestartMessageBox(gfx::NativeWindow parent_window) {
62 const int kDialogWidth = 400; 61 const int kDialogWidth = 400;
63 // Also deleted when the window closes. 62 // Also deleted when the window closes.
64 message_box_view_ = new views::MessageBoxView( 63 message_box_view_ = new views::MessageBoxView(
65 ui::MessageBoxFlags::kFlagHasMessage | 64 views::MessageBoxView::NO_OPTIONS,
66 ui::MessageBoxFlags::kFlagHasOKButton,
67 l10n_util::GetStringUTF16(IDS_OPTIONS_RELAUNCH_REQUIRED), 65 l10n_util::GetStringUTF16(IDS_OPTIONS_RELAUNCH_REQUIRED),
68 string16(), 66 string16(),
69 kDialogWidth); 67 kDialogWidth);
70 views::Widget::CreateWindowWithParent(this, parent_window)->Show(); 68 views::Widget::CreateWindowWithParent(this, parent_window)->Show();
71 } 69 }
72 70
73 RestartMessageBox::~RestartMessageBox() { 71 RestartMessageBox::~RestartMessageBox() {
74 } 72 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/repost_form_warning_view.cc ('k') | chrome/browser/ui/views/simple_message_box_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698