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

Side by Side Diff: ash/system/chromeos/tray_display.cc

Issue 2193913002: Added Ash.SystemMenu.DefaultView.VisibleRows histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Merge remote-tracking branch 'refs/remotes/branch-heads/2785' into drover_2785 Created 4 years, 4 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_caps_lock.cc ('k') | ash/system/tray/system_tray.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 <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
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
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
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_caps_lock.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698