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

Side by Side Diff: ash/system/chromeos/power/tray_power.cc

Issue 800983006: Update {virtual,override,final} to follow C++11 style in ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Workaround Created 5 years, 11 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
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/chromeos/power/tray_power.h" 5 #include "ash/system/chromeos/power/tray_power.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/chromeos/power/power_status_view.h" 10 #include "ash/system/chromeos/power/power_status_view.h"
(...skipping 29 matching lines...) Expand all
40 namespace ash { 40 namespace ash {
41 namespace tray { 41 namespace tray {
42 42
43 // This view is used only for the tray. 43 // This view is used only for the tray.
44 class PowerTrayView : public views::ImageView { 44 class PowerTrayView : public views::ImageView {
45 public: 45 public:
46 PowerTrayView() { 46 PowerTrayView() {
47 UpdateImage(); 47 UpdateImage();
48 } 48 }
49 49
50 virtual ~PowerTrayView() { 50 ~PowerTrayView() override {}
51 }
52 51
53 // Overriden from views::View. 52 // Overriden from views::View.
54 virtual void GetAccessibleState(ui::AXViewState* state) override { 53 void GetAccessibleState(ui::AXViewState* state) override {
55 state->name = accessible_name_; 54 state->name = accessible_name_;
56 state->role = ui::AX_ROLE_BUTTON; 55 state->role = ui::AX_ROLE_BUTTON;
57 } 56 }
58 57
59 void UpdateStatus(bool battery_alert) { 58 void UpdateStatus(bool battery_alert) {
60 UpdateImage(); 59 UpdateImage();
61 SetVisible(PowerStatus::Get()->IsBatteryPresent()); 60 SetVisible(PowerStatus::Get()->IsBatteryPresent());
62 61
63 if (battery_alert) { 62 if (battery_alert) {
64 accessible_name_ = PowerStatus::Get()->GetAccessibleNameString(true); 63 accessible_name_ = PowerStatus::Get()->GetAccessibleNameString(true);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 301 }
303 return false; 302 return false;
304 case NOTIFICATION_CRITICAL: 303 case NOTIFICATION_CRITICAL:
305 return false; 304 return false;
306 } 305 }
307 NOTREACHED(); 306 NOTREACHED();
308 return false; 307 return false;
309 } 308 }
310 309
311 } // namespace ash 310 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/power/tray_power.h ('k') | ash/system/chromeos/power/tray_power_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698