OLD | NEW |
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/ui/views/update_recommended_message_box.h" | 5 #include "chrome/browser/ui/views/update_recommended_message_box.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
10 #include "chrome/browser/ui/dialog_style.h" | 10 #include "chrome/browser/ui/dialog_style.h" |
11 #include "chrome/browser/ui/views/window.h" | 11 #include "chrome/browser/ui/views/window.h" |
12 #include "grit/chromium_strings.h" | 12 #include "grit/chromium_strings.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/views/controls/message_box_view.h" | 15 #include "ui/views/controls/message_box_view.h" |
16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
17 | 17 |
18 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
19 #include "chrome/browser/chromeos/cros/cros_library.h" | 19 #include "chrome/browser/chromeos/cros/cros_library.h" |
20 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 20 #include "chromeos/dbus/dbus_thread_manager.h" |
21 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 21 #include "chromeos/dbus/power_manager_client.h" |
22 #endif | 22 #endif |
23 | 23 |
24 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
25 // UpdateRecommendedMessageBox, public: | 25 // UpdateRecommendedMessageBox, public: |
26 | 26 |
27 // static | 27 // static |
28 void UpdateRecommendedMessageBox::ShowMessageBox( | 28 void UpdateRecommendedMessageBox::ShowMessageBox( |
29 gfx::NativeWindow parent_window) { | 29 gfx::NativeWindow parent_window) { |
30 // When the window closes, it will delete itself. | 30 // When the window closes, it will delete itself. |
31 new UpdateRecommendedMessageBox(parent_window); | 31 new UpdateRecommendedMessageBox(parent_window); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 message_box_view_ = new views::MessageBoxView( | 94 message_box_view_ = new views::MessageBoxView( |
95 views::MessageBoxView::NO_OPTIONS, | 95 views::MessageBoxView::NO_OPTIONS, |
96 l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED, product_name), | 96 l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED, product_name), |
97 string16(), | 97 string16(), |
98 kDialogWidth); | 98 kDialogWidth); |
99 views::Widget::CreateWindowWithParent(this, parent_window)->Show(); | 99 views::Widget::CreateWindowWithParent(this, parent_window)->Show(); |
100 } | 100 } |
101 | 101 |
102 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { | 102 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { |
103 } | 103 } |
OLD | NEW |