OLD | NEW |
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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 label_->SizeToFit(label_max_width); | 311 label_->SizeToFit(label_max_width); |
312 } | 312 } |
313 | 313 |
314 views::ImageView* image_; | 314 views::ImageView* image_; |
315 views::Label* label_; | 315 views::Label* label_; |
316 | 316 |
317 DISALLOW_COPY_AND_ASSIGN(DisplayView); | 317 DISALLOW_COPY_AND_ASSIGN(DisplayView); |
318 }; | 318 }; |
319 | 319 |
320 TrayDisplay::TrayDisplay(SystemTray* system_tray) | 320 TrayDisplay::TrayDisplay(SystemTray* system_tray) |
321 : SystemTrayItem(system_tray), default_(NULL) { | 321 : SystemTrayItem(system_tray, UMA_DISPLAY), default_(nullptr) { |
322 WmShell::Get()->AddDisplayObserver(this); | 322 WmShell::Get()->AddDisplayObserver(this); |
323 UpdateDisplayInfo(NULL); | 323 UpdateDisplayInfo(NULL); |
324 } | 324 } |
325 | 325 |
326 TrayDisplay::~TrayDisplay() { | 326 TrayDisplay::~TrayDisplay() { |
327 WmShell::Get()->RemoveDisplayObserver(this); | 327 WmShell::Get()->RemoveDisplayObserver(this); |
328 } | 328 } |
329 | 329 |
330 void TrayDisplay::UpdateDisplayInfo(TrayDisplay::DisplayInfoMap* old_info) { | 330 void TrayDisplay::UpdateDisplayInfo(TrayDisplay::DisplayInfoMap* old_info) { |
331 if (old_info) | 331 if (old_info) |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 472 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
473 views::View* view = default_; | 473 views::View* view = default_; |
474 if (view) { | 474 if (view) { |
475 view->GetAccessibleState(state); | 475 view->GetAccessibleState(state); |
476 return true; | 476 return true; |
477 } | 477 } |
478 return false; | 478 return false; |
479 } | 479 } |
480 | 480 |
481 } // namespace ash | 481 } // namespace ash |
OLD | NEW |