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

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

Issue 621133002: replace OVERRIDE and FINAL with override and final in ash/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « ash/system/tray_update.h ('k') | ash/system/user/accounts_detailed_view.h » ('j') | 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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 AddChildView(image); 77 AddChildView(image);
78 AddChildView(new views::Label( 78 AddChildView(new views::Label(
79 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE))); 79 bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE)));
80 SetAccessibleName(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE)); 80 SetAccessibleName(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE));
81 } 81 }
82 82
83 virtual ~UpdateView() {} 83 virtual ~UpdateView() {}
84 84
85 private: 85 private:
86 // Overridden from ActionableView. 86 // Overridden from ActionableView.
87 virtual bool PerformAction(const ui::Event& event) OVERRIDE { 87 virtual bool PerformAction(const ui::Event& event) override {
88 ash::Shell::GetInstance()-> 88 ash::Shell::GetInstance()->
89 system_tray_delegate()->RequestRestartForUpdate(); 89 system_tray_delegate()->RequestRestartForUpdate();
90 return true; 90 return true;
91 } 91 }
92 92
93 DISALLOW_COPY_AND_ASSIGN(UpdateView); 93 DISALLOW_COPY_AND_ASSIGN(UpdateView);
94 }; 94 };
95 95
96 } 96 }
97 97
(...skipping 26 matching lines...) Expand all
124 &UpdateNagger::Nag); 124 &UpdateNagger::Nag);
125 } 125 }
126 126
127 private: 127 private:
128 void Nag() { 128 void Nag() {
129 owner_->PopupDetailedView(kShowUpdateNaggerForSeconds, false); 129 owner_->PopupDetailedView(kShowUpdateNaggerForSeconds, false);
130 } 130 }
131 131
132 // Overridden from ui::LayerAnimationObserver. 132 // Overridden from ui::LayerAnimationObserver.
133 virtual void OnLayerAnimationEnded( 133 virtual void OnLayerAnimationEnded(
134 ui::LayerAnimationSequence* sequence) OVERRIDE { 134 ui::LayerAnimationSequence* sequence) override {
135 // TODO(oshima): Find out if the updator will be shown on non 135 // TODO(oshima): Find out if the updator will be shown on non
136 // primary display. 136 // primary display.
137 if (Shell::GetPrimaryRootWindowController()->shelf()->IsVisible()) 137 if (Shell::GetPrimaryRootWindowController()->shelf()->IsVisible())
138 timer_.Stop(); 138 timer_.Stop();
139 else if (!timer_.IsRunning()) 139 else if (!timer_.IsRunning())
140 RestartTimer(); 140 RestartTimer();
141 } 141 }
142 142
143 virtual void OnLayerAnimationAborted( 143 virtual void OnLayerAnimationAborted(
144 ui::LayerAnimationSequence* sequence) OVERRIDE {} 144 ui::LayerAnimationSequence* sequence) override {}
145 145
146 virtual void OnLayerAnimationScheduled( 146 virtual void OnLayerAnimationScheduled(
147 ui::LayerAnimationSequence* sequence) OVERRIDE {} 147 ui::LayerAnimationSequence* sequence) override {}
148 148
149 SystemTrayItem* owner_; 149 SystemTrayItem* owner_;
150 base::OneShotTimer<UpdateNagger> timer_; 150 base::OneShotTimer<UpdateNagger> timer_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(UpdateNagger); 152 DISALLOW_COPY_AND_ASSIGN(UpdateNagger);
153 }; 153 };
154 154
155 } // namespace tray 155 } // namespace tray
156 156
157 TrayUpdate::TrayUpdate(SystemTray* system_tray) 157 TrayUpdate::TrayUpdate(SystemTray* system_tray)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 SetImageFromResourceId(DecideResource(severity_, false)); 193 SetImageFromResourceId(DecideResource(severity_, false));
194 tray_view()->SetVisible(true); 194 tray_view()->SetVisible(true);
195 if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() && 195 if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() &&
196 !nagger_.get()) { 196 !nagger_.get()) {
197 // The shelf is not visible, and there is no nagger scheduled. 197 // The shelf is not visible, and there is no nagger scheduled.
198 nagger_.reset(new tray::UpdateNagger(this)); 198 nagger_.reset(new tray::UpdateNagger(this));
199 } 199 }
200 } 200 }
201 201
202 } // namespace ash 202 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray_update.h ('k') | ash/system/user/accounts_detailed_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698