| OLD | NEW |
| 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/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/base/message_box_flags.h" | |
| 16 #include "ui/views/controls/message_box_view.h" | 15 #include "ui/views/controls/message_box_view.h" |
| 17 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
| 18 | 17 |
| 19 #if defined(OS_CHROMEOS) | 18 #if defined(OS_CHROMEOS) |
| 20 #include "chrome/browser/chromeos/cros/cros_library.h" | 19 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 21 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 20 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 22 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 21 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 23 #endif | 22 #endif |
| 24 | 23 |
| 25 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 gfx::NativeWindow parent_window) { | 91 gfx::NativeWindow parent_window) { |
| 93 const int kDialogWidth = 400; | 92 const int kDialogWidth = 400; |
| 94 #if defined(OS_CHROMEOS) | 93 #if defined(OS_CHROMEOS) |
| 95 const int kProductNameId = IDS_PRODUCT_OS_NAME; | 94 const int kProductNameId = IDS_PRODUCT_OS_NAME; |
| 96 #else | 95 #else |
| 97 const int kProductNameId = IDS_PRODUCT_NAME; | 96 const int kProductNameId = IDS_PRODUCT_NAME; |
| 98 #endif | 97 #endif |
| 99 const string16 product_name = l10n_util::GetStringUTF16(kProductNameId); | 98 const string16 product_name = l10n_util::GetStringUTF16(kProductNameId); |
| 100 // Also deleted when the window closes. | 99 // Also deleted when the window closes. |
| 101 message_box_view_ = new views::MessageBoxView( | 100 message_box_view_ = new views::MessageBoxView( |
| 102 ui::MessageBoxFlags::kFlagHasMessage | | 101 views::MessageBoxView::NO_OPTIONS, |
| 103 ui::MessageBoxFlags::kFlagHasOKButton, | |
| 104 l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED, product_name), | 102 l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED, product_name), |
| 105 string16(), | 103 string16(), |
| 106 kDialogWidth); | 104 kDialogWidth); |
| 107 browser::CreateViewsWindow(parent_window, this, STYLE_GENERIC)->Show(); | 105 browser::CreateViewsWindow(parent_window, this, STYLE_GENERIC)->Show(); |
| 108 } | 106 } |
| 109 | 107 |
| 110 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { | 108 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { |
| 111 } | 109 } |
| OLD | NEW |