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/common/system/tray/tray_image_item.cc

Issue 2148593004: mash: Move StatusTray and StatusAreaWidget to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@traydisplay
Patch Set: rebase 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/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_item_view.h" 11 #include "ash/common/system/tray/tray_item_view.h"
11 #include "ash/common/system/tray/tray_utils.h" 12 #include "ash/common/system/tray/tray_utils.h"
12 #include "ash/system/tray/system_tray.h"
13 #include "grit/ash_resources.h" 13 #include "grit/ash_resources.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/gfx/image/image.h" 15 #include "ui/gfx/image/image.h"
16 #include "ui/gfx/paint_vector_icon.h" 16 #include "ui/gfx/paint_vector_icon.h"
17 #include "ui/gfx/vector_icons_public.h" 17 #include "ui/gfx/vector_icons_public.h"
18 #include "ui/views/controls/image_view.h" 18 #include "ui/views/controls/image_view.h"
19 #include "ui/views/layout/box_layout.h" 19 #include "ui/views/layout/box_layout.h"
20 20
21 namespace ash { 21 namespace ash {
22 22
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) { 121 void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) {
122 // Center the item dependent on the orientation of the shelf. 122 // Center the item dependent on the orientation of the shelf.
123 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment) 123 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment)
124 ? views::BoxLayout::kHorizontal 124 ? views::BoxLayout::kHorizontal
125 : views::BoxLayout::kVertical; 125 : views::BoxLayout::kVertical;
126 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0)); 126 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
127 tray_view_->Layout(); 127 tray_view_->Layout();
128 } 128 }
129 129
130 } // namespace ash 130 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_details_view_unittest.cc ('k') | ash/common/system/tray/tray_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698