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

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

Issue 56026: Move message flags into a separate header that can be used (Closed)
Patch Set: ctor Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/restart_message_box.h" 5 #include "chrome/browser/views/restart_message_box.h"
6 6
7 #include "chrome/common/l10n_util.h" 7 #include "chrome/common/l10n_util.h"
8 #include "chrome/common/message_box_flags.h"
8 #include "chrome/views/controls/message_box_view.h" 9 #include "chrome/views/controls/message_box_view.h"
9 #include "chrome/views/window/window.h" 10 #include "chrome/views/window/window.h"
10 #include "grit/chromium_strings.h" 11 #include "grit/chromium_strings.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 13
13 //////////////////////////////////////////////////////////////////////////////// 14 ////////////////////////////////////////////////////////////////////////////////
14 // RestartMessageBox, public: 15 // RestartMessageBox, public:
15 16
16 // static 17 // static
17 void RestartMessageBox::ShowMessageBox(HWND parent_hwnd) { 18 void RestartMessageBox::ShowMessageBox(HWND parent_hwnd) {
(...skipping 27 matching lines...) Expand all
45 return message_box_view_; 46 return message_box_view_;
46 } 47 }
47 48
48 //////////////////////////////////////////////////////////////////////////////// 49 ////////////////////////////////////////////////////////////////////////////////
49 // RestartMessageBox, private: 50 // RestartMessageBox, private:
50 51
51 RestartMessageBox::RestartMessageBox(HWND parent_hwnd) { 52 RestartMessageBox::RestartMessageBox(HWND parent_hwnd) {
52 const int kDialogWidth = 400; 53 const int kDialogWidth = 400;
53 // Also deleted when the window closes. 54 // Also deleted when the window closes.
54 message_box_view_ = new MessageBoxView( 55 message_box_view_ = new MessageBoxView(
55 MessageBoxView::kFlagHasMessage | MessageBoxView::kFlagHasOKButton, 56 MessageBox::kFlagHasMessage | MessageBox::kFlagHasOKButton,
56 l10n_util::GetString(IDS_OPTIONS_RESTART_REQUIRED).c_str(), 57 l10n_util::GetString(IDS_OPTIONS_RESTART_REQUIRED).c_str(),
57 std::wstring(), 58 std::wstring(),
58 kDialogWidth); 59 kDialogWidth);
59 views::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), this)->Show(); 60 views::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), this)->Show();
60 } 61 }
61 62
62 RestartMessageBox::~RestartMessageBox() { 63 RestartMessageBox::~RestartMessageBox() {
63 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/views/repost_form_warning_view.cc ('k') | chrome/browser/views/user_data_dir_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698