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

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

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: merge 2 trunk Created 4 years, 8 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/system/tray/tray_image_item.h" 5 #include "ash/system/tray/tray_image_item.h"
6 6
7 #include "ash/shelf/shelf_util.h" 7 #include "ash/shelf/shelf_util.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/tray_item_view.h" 9 #include "ash/system/tray/tray_item_view.h"
10 #include "ash/system/tray/tray_utils.h" 10 #include "ash/system/tray/tray_utils.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return NULL; 50 return NULL;
51 } 51 }
52 52
53 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) { 53 views::View* TrayImageItem::CreateDetailedView(user::LoginStatus status) {
54 return NULL; 54 return NULL;
55 } 55 }
56 56
57 void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { 57 void TrayImageItem::UpdateAfterLoginStatusChange(user::LoginStatus status) {
58 } 58 }
59 59
60 void TrayImageItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { 60 void TrayImageItem::UpdateAfterShelfAlignmentChange(
61 wm::ShelfAlignment alignment) {
61 SetTrayImageItemBorder(tray_view_, alignment); 62 SetTrayImageItemBorder(tray_view_, alignment);
62 SetItemAlignment(alignment); 63 SetItemAlignment(alignment);
63 } 64 }
64 65
65 void TrayImageItem::DestroyTrayView() { 66 void TrayImageItem::DestroyTrayView() {
66 tray_view_ = NULL; 67 tray_view_ = NULL;
67 } 68 }
68 69
69 void TrayImageItem::DestroyDefaultView() { 70 void TrayImageItem::DestroyDefaultView() {
70 } 71 }
71 72
72 void TrayImageItem::DestroyDetailedView() { 73 void TrayImageItem::DestroyDetailedView() {
73 } 74 }
74 75
75 void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) { 76 void TrayImageItem::SetItemAlignment(wm::ShelfAlignment alignment) {
76 // Center the item dependent on the orientation of the shelf. 77 // Center the item dependent on the orientation of the shelf.
77 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment) 78 views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment)
78 ? views::BoxLayout::kHorizontal 79 ? views::BoxLayout::kHorizontal
79 : views::BoxLayout::kVertical; 80 : views::BoxLayout::kVertical;
80 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0)); 81 tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
81 tray_view_->Layout(); 82 tray_view_->Layout();
82 } 83 }
83 84
84 } // namespace ash 85 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698