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_bubble.h" | 5 #include "ash/system/tray/system_tray_bubble.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 } | 120 } |
121 | 121 |
122 private: | 122 private: |
123 scoped_ptr<ui::Layer> layer_; | 123 scoped_ptr<ui::Layer> layer_; |
124 | 124 |
125 DISALLOW_COPY_AND_ASSIGN(AnimationObserverDeleteLayer); | 125 DISALLOW_COPY_AND_ASSIGN(AnimationObserverDeleteLayer); |
126 }; | 126 }; |
127 | 127 |
128 } // namespace | 128 } // namespace |
129 | 129 |
130 namespace internal { | |
131 | |
132 // SystemTrayBubble | 130 // SystemTrayBubble |
133 | 131 |
134 SystemTrayBubble::SystemTrayBubble( | 132 SystemTrayBubble::SystemTrayBubble( |
135 ash::SystemTray* tray, | 133 ash::SystemTray* tray, |
136 const std::vector<ash::SystemTrayItem*>& items, | 134 const std::vector<ash::SystemTrayItem*>& items, |
137 BubbleType bubble_type) | 135 BubbleType bubble_type) |
138 : tray_(tray), | 136 : tray_(tray), |
139 bubble_view_(NULL), | 137 bubble_view_(NULL), |
140 items_(items), | 138 items_(items), |
141 bubble_type_(bubble_type), | 139 bubble_type_(bubble_type), |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 // For default view, draw bottom border for each item, except the last | 375 // For default view, draw bottom border for each item, except the last |
378 // 2 items, which are the bottom header row and the one just above it. | 376 // 2 items, which are the bottom header row and the one just above it. |
379 bubble_view_->AddChildView(new TrayPopupItemContainer( | 377 bubble_view_->AddChildView(new TrayPopupItemContainer( |
380 item_views[i], is_default_bubble, | 378 item_views[i], is_default_bubble, |
381 is_default_bubble && (i < item_views.size() - 2))); | 379 is_default_bubble && (i < item_views.size() - 2))); |
382 } | 380 } |
383 if (focus_view) | 381 if (focus_view) |
384 focus_view->RequestFocus(); | 382 focus_view->RequestFocus(); |
385 } | 383 } |
386 | 384 |
387 } // namespace internal | |
388 } // namespace ash | 385 } // namespace ash |
OLD | NEW |