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

Side by Side Diff: ash/system/chromeos/tray_display.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/chromeos/tray_display.h ('k') | ash/system/chromeos/tray_display_unittest.cc » ('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/chromeos/tray_display.h" 5 #include "ash/system/chromeos/tray_display.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/system_notifier.h" 10 #include "ash/system/system_notifier.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 SetVisible(!message.empty()); 163 SetVisible(!message.empty());
164 label_->SetText(message); 164 label_->SetText(message);
165 SetAccessibleName(message); 165 SetAccessibleName(message);
166 Layout(); 166 Layout();
167 } 167 }
168 168
169 const views::Label* label() const { return label_; } 169 const views::Label* label() const { return label_; }
170 170
171 // Overridden from views::View. 171 // Overridden from views::View.
172 virtual bool GetTooltipText(const gfx::Point& p, 172 virtual bool GetTooltipText(const gfx::Point& p,
173 base::string16* tooltip) const OVERRIDE { 173 base::string16* tooltip) const override {
174 base::string16 tray_message = GetTrayDisplayMessage(NULL); 174 base::string16 tray_message = GetTrayDisplayMessage(NULL);
175 base::string16 display_message = GetAllDisplayInfo(); 175 base::string16 display_message = GetAllDisplayInfo();
176 if (tray_message.empty() && display_message.empty()) 176 if (tray_message.empty() && display_message.empty())
177 return false; 177 return false;
178 178
179 *tooltip = tray_message + base::ASCIIToUTF16("\n") + display_message; 179 *tooltip = tray_message + base::ASCIIToUTF16("\n") + display_message;
180 return true; 180 return true;
181 } 181 }
182 182
183 // Returns the name of the currently connected external display. 183 // Returns the name of the currently connected external display.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool ShouldShowFirstDisplayInfo() const { 262 bool ShouldShowFirstDisplayInfo() const {
263 const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo( 263 const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo(
264 GetDisplayManager()->first_display_id()); 264 GetDisplayManager()->first_display_id());
265 return display_info.rotation() != gfx::Display::ROTATE_0 || 265 return display_info.rotation() != gfx::Display::ROTATE_0 ||
266 display_info.configured_ui_scale() != 1.0f || 266 display_info.configured_ui_scale() != 1.0f ||
267 !display_info.overscan_insets_in_dip().empty() || 267 !display_info.overscan_insets_in_dip().empty() ||
268 display_info.has_overscan(); 268 display_info.has_overscan();
269 } 269 }
270 270
271 // Overridden from ActionableView. 271 // Overridden from ActionableView.
272 virtual bool PerformAction(const ui::Event& event) OVERRIDE { 272 virtual bool PerformAction(const ui::Event& event) override {
273 OpenSettings(); 273 OpenSettings();
274 return true; 274 return true;
275 } 275 }
276 276
277 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE { 277 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override {
278 int label_max_width = bounds().width() - kTrayPopupPaddingHorizontal * 2 - 278 int label_max_width = bounds().width() - kTrayPopupPaddingHorizontal * 2 -
279 kTrayPopupPaddingBetweenItems - image_->GetPreferredSize().width(); 279 kTrayPopupPaddingBetweenItems - image_->GetPreferredSize().width();
280 label_->SizeToFit(label_max_width); 280 label_->SizeToFit(label_max_width);
281 } 281 }
282 282
283 views::ImageView* image_; 283 views::ImageView* image_;
284 views::Label* label_; 284 views::Label* label_;
285 285
286 DISALLOW_COPY_AND_ASSIGN(DisplayView); 286 DISALLOW_COPY_AND_ASSIGN(DisplayView);
287 }; 287 };
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { 441 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) {
442 views::View* view = default_; 442 views::View* view = default_;
443 if (view) { 443 if (view) {
444 view->GetAccessibleState(state); 444 view->GetAccessibleState(state);
445 return true; 445 return true;
446 } 446 }
447 return false; 447 return false;
448 } 448 }
449 449
450 } // namespace ash 450 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_display.h ('k') | ash/system/chromeos/tray_display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698