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