| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 bool draw_border) | 46 bool draw_border) |
| 47 : hover_(false), | 47 : hover_(false), |
| 48 change_background_(change_background) { | 48 change_background_(change_background) { |
| 49 set_notify_enter_exit_on_child(true); | 49 set_notify_enter_exit_on_child(true); |
| 50 if (draw_border) { | 50 if (draw_border) { |
| 51 SetBorder( | 51 SetBorder( |
| 52 views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor)); | 52 views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor)); |
| 53 } | 53 } |
| 54 views::BoxLayout* layout = new views::BoxLayout( | 54 views::BoxLayout* layout = new views::BoxLayout( |
| 55 views::BoxLayout::kVertical, 0, 0, 0); | 55 views::BoxLayout::kVertical, 0, 0, 0); |
| 56 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); | 56 layout->SetDefaultFlex(1); |
| 57 SetLayoutManager(layout); | 57 SetLayoutManager(layout); |
| 58 SetPaintToLayer(view->layer() != NULL); | 58 SetPaintToLayer(view->layer() != NULL); |
| 59 if (view->layer()) | 59 if (view->layer()) |
| 60 SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely()); | 60 SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely()); |
| 61 AddChildView(view); | 61 AddChildView(view); |
| 62 SetVisible(view->visible()); | 62 SetVisible(view->visible()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 virtual ~TrayPopupItemContainer() {} | 65 virtual ~TrayPopupItemContainer() {} |
| 66 | 66 |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // 2 items, which are the bottom header row and the one just above it. | 383 // 2 items, which are the bottom header row and the one just above it. |
| 384 bubble_view_->AddChildView(new TrayPopupItemContainer( | 384 bubble_view_->AddChildView(new TrayPopupItemContainer( |
| 385 item_views[i], is_default_bubble, | 385 item_views[i], is_default_bubble, |
| 386 is_default_bubble && (i < item_views.size() - 2))); | 386 is_default_bubble && (i < item_views.size() - 2))); |
| 387 } | 387 } |
| 388 if (focus_view) | 388 if (focus_view) |
| 389 focus_view->RequestFocus(); | 389 focus_view->RequestFocus(); |
| 390 } | 390 } |
| 391 | 391 |
| 392 } // namespace ash | 392 } // namespace ash |
| OLD | NEW |