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

Side by Side Diff: ash/common/system/tray/tray_image_item.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 5 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/common/system/tray/tray_image_item.h" 5 #include "ash/common/system/tray/tray_image_item.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/wm_shelf_util.h" 8 #include "ash/common/shelf/wm_shelf_util.h"
9 #include "ash/common/system/tray/system_tray.h" 9 #include "ash/common/system/tray/system_tray.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 default: 47 default:
48 NOTREACHED(); 48 NOTREACHED();
49 break; 49 break;
50 } 50 }
51 51
52 return vector_id; 52 return vector_id;
53 } 53 }
54 54
55 } // namespace 55 } // namespace
56 56
57 TrayImageItem::TrayImageItem(SystemTray* system_tray, int resource_id) 57 TrayImageItem::TrayImageItem(SystemTray* system_tray,
58 : SystemTrayItem(system_tray), 58 int resource_id,
59 UmaType uma_type)
60 : SystemTrayItem(system_tray, uma_type),
59 resource_id_(resource_id), 61 resource_id_(resource_id),
60 tray_view_(nullptr) {} 62 tray_view_(nullptr) {}
61 63
62 TrayImageItem::~TrayImageItem() {} 64 TrayImageItem::~TrayImageItem() {}
63 65
64 views::View* TrayImageItem::tray_view() { 66 views::View* TrayImageItem::tray_view() {
65 return tray_view_; 67 return tray_view_;
66 } 68 }
67 69
68 views::View* TrayImageItem::CreateTrayView(LoginStatus status) { 70 views::View* TrayImageItem::CreateTrayView(LoginStatus status) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) { 123 void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) {
122 // Center the item dependent on the orientation of the shelf. 124 // Center the item dependent on the orientation of the shelf.
123 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment) 125 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment)
124 ? views::BoxLayout::kHorizontal 126 ? views::BoxLayout::kHorizontal
125 : views::BoxLayout::kVertical; 127 : views::BoxLayout::kVertical;
126 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0)); 128 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
127 tray_view_->Layout(); 129 tray_view_->Layout();
128 } 130 }
129 131
130 } // namespace ash 132 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_image_item.h ('k') | ash/common/system/tray/tray_popup_item_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698