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/tray/system_tray.h" | 5 #include "ash/system/tray/system_tray.h" |
6 | 6 |
7 #include "ash/shell/panel_window.h" | 7 #include "ash/shell/panel_window.h" |
8 #include "ash/system/tray/system_tray_item.h" | 8 #include "ash/system/tray/system_tray_item.h" |
9 #include "ash/wm/shadow_types.h" | 9 #include "ash/wm/shadow_types.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 ++it) { | 86 ++it) { |
87 (*it)->DestroyTrayView(); | 87 (*it)->DestroyTrayView(); |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 void SystemTray::AddTrayItem(SystemTrayItem* item) { | 91 void SystemTray::AddTrayItem(SystemTrayItem* item) { |
92 items_.push_back(item); | 92 items_.push_back(item); |
93 | 93 |
94 views::View* tray_item = item->CreateTrayView(); | 94 views::View* tray_item = item->CreateTrayView(); |
95 if (tray_item) { | 95 if (tray_item) { |
96 AddChildView(tray_item); | 96 AddChildViewAt(tray_item, 0); |
97 PreferredSizeChanged(); | 97 PreferredSizeChanged(); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 void SystemTray::RemoveTrayItem(SystemTrayItem* item) { | 101 void SystemTray::RemoveTrayItem(SystemTrayItem* item) { |
102 NOTIMPLEMENTED(); | 102 NOTIMPLEMENTED(); |
103 } | 103 } |
104 | 104 |
105 void SystemTray::ShowDetailedView(SystemTrayItem* item) { | 105 void SystemTray::ShowDetailedView(SystemTrayItem* item) { |
106 if (popup_) | 106 if (popup_) |
(...skipping 20 matching lines...) Expand all Loading... |
127 ShowItems(items_, false); | 127 ShowItems(items_, false); |
128 return true; | 128 return true; |
129 } | 129 } |
130 | 130 |
131 void SystemTray::OnWidgetClosing(views::Widget* widget) { | 131 void SystemTray::OnWidgetClosing(views::Widget* widget) { |
132 CHECK_EQ(popup_, widget); | 132 CHECK_EQ(popup_, widget); |
133 popup_ = NULL; | 133 popup_ = NULL; |
134 } | 134 } |
135 | 135 |
136 } // namespace ash | 136 } // namespace ash |
OLD | NEW |