| 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/views/window.h" | 10 #include "chrome/browser/ui/views/window.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 gfx::NativeWindow parent_window) { | 90 gfx::NativeWindow parent_window) { |
| 91 const int kDialogWidth = 400; | 91 const int kDialogWidth = 400; |
| 92 #if defined(OS_CHROMEOS) | 92 #if defined(OS_CHROMEOS) |
| 93 const int kProductNameId = IDS_PRODUCT_OS_NAME; | 93 const int kProductNameId = IDS_PRODUCT_OS_NAME; |
| 94 #else | 94 #else |
| 95 const int kProductNameId = IDS_PRODUCT_NAME; | 95 const int kProductNameId = IDS_PRODUCT_NAME; |
| 96 #endif | 96 #endif |
| 97 const string16 product_name = l10n_util::GetStringUTF16(kProductNameId); | 97 const string16 product_name = l10n_util::GetStringUTF16(kProductNameId); |
| 98 // Also deleted when the window closes. | 98 // Also deleted when the window closes. |
| 99 message_box_view_ = new views::MessageBoxView( | 99 message_box_view_ = new views::MessageBoxView( |
| 100 ui::MessageBoxFlags::kFlagHasMessage | | 100 ui::MessageBoxFlags::kIsJavascriptAlert, |
| 101 ui::MessageBoxFlags::kFlagHasOKButton, | |
| 102 l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED, product_name), | 101 l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED, product_name), |
| 103 string16(), | 102 string16(), |
| 104 kDialogWidth); | 103 kDialogWidth); |
| 105 browser::CreateViewsWindow(parent_window, this)->Show(); | 104 browser::CreateViewsWindow(parent_window, this)->Show(); |
| 106 } | 105 } |
| 107 | 106 |
| 108 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { | 107 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { |
| 109 } | 108 } |
| OLD | NEW |