OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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_popup_item_container.h" | 5 #include "ash/system/tray/tray_popup_item_container.h" |
6 | 6 |
7 #include "ash/common/system/tray/tray_constants.h" | 7 #include "ash/system/tray/tray_constants.h" |
8 #include "ui/gfx/canvas.h" | 8 #include "ui/gfx/canvas.h" |
9 #include "ui/views/layout/box_layout.h" | 9 #include "ui/views/layout/box_layout.h" |
10 | 10 |
11 namespace ash { | 11 namespace ash { |
12 | 12 |
13 TrayPopupItemContainer::TrayPopupItemContainer(views::View* view, | 13 TrayPopupItemContainer::TrayPopupItemContainer(views::View* view, |
14 bool change_background) | 14 bool change_background) |
15 : active_(false), change_background_(change_background) { | 15 : active_(false), change_background_(change_background) { |
16 set_notify_enter_exit_on_child(true); | 16 set_notify_enter_exit_on_child(true); |
17 views::BoxLayout* layout = | 17 views::BoxLayout* layout = |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 return; | 68 return; |
69 | 69 |
70 views::View* view = child_at(0); | 70 views::View* view = child_at(0); |
71 if (!view->background()) { | 71 if (!view->background()) { |
72 canvas->FillRect(gfx::Rect(size()), | 72 canvas->FillRect(gfx::Rect(size()), |
73 (active_) ? kHoverBackgroundColor : kBackgroundColor); | 73 (active_) ? kHoverBackgroundColor : kBackgroundColor); |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 } // namespace ash | 77 } // namespace ash |
OLD | NEW |