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

Side by Side Diff: ash/system/web_notification/web_notification_tray.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
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/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_layout_manager_observer.h" 10 #include "ash/shelf/shelf_layout_manager_observer.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // TODO(mukai): move NINE_PLUS message to ui_strings, it doesn't need to be 135 // TODO(mukai): move NINE_PLUS message to ui_strings, it doesn't need to be
136 // in ash_strings. 136 // in ash_strings.
137 unread_label_->SetText((unread_count > 9) ? 137 unread_label_->SetText((unread_count > 9) ?
138 l10n_util::GetStringUTF16(IDS_ASH_NOTIFICATION_UNREAD_COUNT_NINE_PLUS) : 138 l10n_util::GetStringUTF16(IDS_ASH_NOTIFICATION_UNREAD_COUNT_NINE_PLUS) :
139 base::FormatNumber(unread_count)); 139 base::FormatNumber(unread_count));
140 UpdateIconVisibility(); 140 UpdateIconVisibility();
141 } 141 }
142 142
143 protected: 143 protected:
144 // Overridden from views::ImageButton: 144 // Overridden from views::ImageButton:
145 virtual gfx::Size GetPreferredSize() const OVERRIDE { 145 virtual gfx::Size GetPreferredSize() const override {
146 return gfx::Size(kShelfItemHeight, kShelfItemHeight); 146 return gfx::Size(kShelfItemHeight, kShelfItemHeight);
147 } 147 }
148 148
149 virtual int GetHeightForWidth(int width) const OVERRIDE { 149 virtual int GetHeightForWidth(int width) const override {
150 return GetPreferredSize().height(); 150 return GetPreferredSize().height();
151 } 151 }
152 152
153 private: 153 private:
154 void UpdateIconVisibility() { 154 void UpdateIconVisibility() {
155 unread_label_->SetEnabledColor( 155 unread_label_->SetEnabledColor(
156 (!is_bubble_visible_ && unread_count_ > 0) ? 156 (!is_bubble_visible_ && unread_count_ > 0) ?
157 kWebNotificationColorWithUnread : kWebNotificationColorNoUnread); 157 kWebNotificationColorWithUnread : kWebNotificationColorNoUnread);
158 SchedulePaint(); 158 SchedulePaint();
159 } 159 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 message_center::MessageCenterBubble* 494 message_center::MessageCenterBubble*
495 WebNotificationTray::GetMessageCenterBubbleForTest() { 495 WebNotificationTray::GetMessageCenterBubbleForTest() {
496 if (!message_center_bubble()) 496 if (!message_center_bubble())
497 return NULL; 497 return NULL;
498 return static_cast<message_center::MessageCenterBubble*>( 498 return static_cast<message_center::MessageCenterBubble*>(
499 message_center_bubble()->bubble()); 499 message_center_bubble()->bubble());
500 } 500 }
501 501
502 } // namespace ash 502 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698