| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/outdated_upgrade_bubble_view.h" | 5 #include "chrome/browser/ui/views/outdated_upgrade_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/ui/views/elevation_icon_setter.h" | 10 #include "chrome/browser/ui/views/elevation_icon_setter.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 | 104 |
| 105 void OutdatedUpgradeBubbleView::Init() { | 105 void OutdatedUpgradeBubbleView::Init() { |
| 106 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 106 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 107 accept_button_ = new views::LabelButton( | 107 accept_button_ = new views::LabelButton( |
| 108 this, l10n_util::GetStringUTF16( | 108 this, l10n_util::GetStringUTF16( |
| 109 auto_update_enabled_ ? IDS_REINSTALL_APP : IDS_REENABLE_UPDATES)); | 109 auto_update_enabled_ ? IDS_REINSTALL_APP : IDS_REENABLE_UPDATES)); |
| 110 accept_button_->SetStyle(views::Button::STYLE_BUTTON); | 110 accept_button_->SetStyle(views::Button::STYLE_BUTTON); |
| 111 accept_button_->SetIsDefault(true); | 111 accept_button_->SetIsDefault(true); |
| 112 accept_button_->SetFontList(rb.GetFontList(ui::ResourceBundle::BoldFont)); | 112 accept_button_->SetFontList(rb.GetFontList(ui::ResourceBundle::BoldFont)); |
| 113 elevation_icon_setter_.reset(new ElevationIconSetter(accept_button_)); | 113 elevation_icon_setter_.reset( |
| 114 new ElevationIconSetter(accept_button_, base::Closure())); |
| 114 | 115 |
| 115 later_button_ = new views::LabelButton( | 116 later_button_ = new views::LabelButton( |
| 116 this, l10n_util::GetStringUTF16(IDS_LATER)); | 117 this, l10n_util::GetStringUTF16(IDS_LATER)); |
| 117 later_button_->SetStyle(views::Button::STYLE_BUTTON); | 118 later_button_->SetStyle(views::Button::STYLE_BUTTON); |
| 118 | 119 |
| 119 views::Label* title_label = new views::Label( | 120 views::Label* title_label = new views::Label( |
| 120 l10n_util::GetStringUTF16(IDS_UPGRADE_BUBBLE_TITLE)); | 121 l10n_util::GetStringUTF16(IDS_UPGRADE_BUBBLE_TITLE)); |
| 121 title_label->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont)); | 122 title_label->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont)); |
| 122 title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 123 title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 123 | 124 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 base::Bind(&google_update::ElevateIfNeededToReenableUpdates)); | 236 base::Bind(&google_update::ElevateIfNeededToReenableUpdates)); |
| 236 #endif // defined(OS_WIN) | 237 #endif // defined(OS_WIN) |
| 237 } | 238 } |
| 238 } else { | 239 } else { |
| 239 DCHECK_EQ(later_button_, sender); | 240 DCHECK_EQ(later_button_, sender); |
| 240 content::RecordAction( | 241 content::RecordAction( |
| 241 base::UserMetricsAction("OutdatedUpgradeBubble.Later")); | 242 base::UserMetricsAction("OutdatedUpgradeBubble.Later")); |
| 242 } | 243 } |
| 243 GetWidget()->Close(); | 244 GetWidget()->Close(); |
| 244 } | 245 } |
| OLD | NEW |