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/common/system/status_area_widget_delegate.h" | 5 #include "ash/common/system/status_area_widget_delegate.h" |
6 | 6 |
7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
8 #include "ash/common/focus_cycler.h" | 8 #include "ash/common/focus_cycler.h" |
9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
10 #include "ash/common/shelf/shelf_constants.h" | 10 #include "ash/common/shelf/shelf_constants.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 } // namespace | 51 } // namespace |
52 | 52 |
53 namespace ash { | 53 namespace ash { |
54 | 54 |
55 StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() | 55 StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() |
56 : focus_cycler_for_testing_(nullptr), alignment_(SHELF_ALIGNMENT_BOTTOM) { | 56 : focus_cycler_for_testing_(nullptr), alignment_(SHELF_ALIGNMENT_BOTTOM) { |
57 // Allow the launcher to surrender the focus to another window upon | 57 // Allow the launcher to surrender the focus to another window upon |
58 // navigation completion by the user. | 58 // navigation completion by the user. |
59 set_allow_deactivate_on_esc(true); | 59 set_allow_deactivate_on_esc(true); |
60 SetPaintToLayer(true); | 60 SetPaintToLayer(); |
61 layer()->SetFillsBoundsOpaquely(false); | 61 layer()->SetFillsBoundsOpaquely(false); |
62 } | 62 } |
63 | 63 |
64 StatusAreaWidgetDelegate::~StatusAreaWidgetDelegate() {} | 64 StatusAreaWidgetDelegate::~StatusAreaWidgetDelegate() {} |
65 | 65 |
66 void StatusAreaWidgetDelegate::SetFocusCyclerForTesting( | 66 void StatusAreaWidgetDelegate::SetFocusCyclerForTesting( |
67 const FocusCycler* focus_cycler) { | 67 const FocusCycler* focus_cycler) { |
68 focus_cycler_for_testing_ = focus_cycler; | 68 focus_cycler_for_testing_ = focus_cycler; |
69 } | 69 } |
70 | 70 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 248 } |
249 child->SetBorder( | 249 child->SetBorder( |
250 views::CreateEmptyBorder(top_edge, left_edge, bottom_edge, right_edge)); | 250 views::CreateEmptyBorder(top_edge, left_edge, bottom_edge, right_edge)); |
251 // Layout on |child| needs to be updated based on new border value before | 251 // Layout on |child| needs to be updated based on new border value before |
252 // displaying; otherwise |child| will be showing with old border size. | 252 // displaying; otherwise |child| will be showing with old border size. |
253 // Fix for crbug.com/623438. | 253 // Fix for crbug.com/623438. |
254 child->Layout(); | 254 child->Layout(); |
255 } | 255 } |
256 | 256 |
257 } // namespace ash | 257 } // namespace ash |
OLD | NEW |