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

Side by Side Diff: ash/system/tray_update.cc

Issue 10078009: Add an accessible name to the restart button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review fixes Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/tray_views.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/system/tray_update.h" 5 #include "ash/system/tray_update.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/system/tray/tray_constants.h" 9 #include "ash/system/tray/tray_constants.h"
10 #include "ash/system/tray/tray_views.h" 10 #include "ash/system/tray/tray_views.h"
(...skipping 18 matching lines...) Expand all
29 29
30 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 30 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
31 views::ImageView* image = 31 views::ImageView* image =
32 new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight); 32 new ash::internal::FixedSizedImageView(0, ash::kTrayPopupItemHeight);
33 image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_UPDATE_DARK). 33 image->SetImage(bundle.GetImageNamed(IDR_AURA_UBER_TRAY_UPDATE_DARK).
34 ToSkBitmap()); 34 ToSkBitmap());
35 35
36 AddChildView(image); 36 AddChildView(image);
37 AddChildView(new views::Label( 37 AddChildView(new views::Label(
38 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE))); 38 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE)));
39 SetAccessibleName(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE));
39 } 40 }
40 41
41 virtual ~UpdateView() {} 42 virtual ~UpdateView() {}
42 43
43 private: 44 private:
44 // Overridden from ActionableView. 45 // Overridden from ActionableView.
45 virtual bool PerformAction(const views::Event& event) OVERRIDE { 46 virtual bool PerformAction(const views::Event& event) OVERRIDE {
46 ash::Shell::GetInstance()->tray_delegate()->RequestRestart(); 47 ash::Shell::GetInstance()->tray_delegate()->RequestRestart();
47 return true; 48 return true;
48 } 49 }
(...skipping 26 matching lines...) Expand all
75 void TrayUpdate::DestroyDefaultView() { 76 void TrayUpdate::DestroyDefaultView() {
76 default_.reset(); 77 default_.reset();
77 } 78 }
78 79
79 void TrayUpdate::OnUpdateRecommended() { 80 void TrayUpdate::OnUpdateRecommended() {
80 image_view()->SetVisible(true); 81 image_view()->SetVisible(true);
81 } 82 }
82 83
83 } // namespace internal 84 } // namespace internal
84 } // namespace ash 85 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698