| 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/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "ui/compositor/layer_animation_observer.h" | 43 #include "ui/compositor/layer_animation_observer.h" |
| 44 #include "ui/compositor/layer_animator.h" | 44 #include "ui/compositor/layer_animator.h" |
| 45 #include "ui/compositor/scoped_layer_animation_settings.h" | 45 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 46 #include "ui/events/event.h" | 46 #include "ui/events/event.h" |
| 47 #include "ui/events/event_handler.h" | 47 #include "ui/events/event_handler.h" |
| 48 #include "ui/gfx/screen.h" | 48 #include "ui/gfx/screen.h" |
| 49 #include "ui/views/widget/widget.h" | 49 #include "ui/views/widget/widget.h" |
| 50 #include "ui/wm/public/activation_client.h" | 50 #include "ui/wm/public/activation_client.h" |
| 51 | 51 |
| 52 namespace ash { | 52 namespace ash { |
| 53 namespace internal { | |
| 54 | |
| 55 namespace { | 53 namespace { |
| 56 | 54 |
| 57 // Delay before showing the shelf. This is after the mouse stops moving. | 55 // Delay before showing the shelf. This is after the mouse stops moving. |
| 58 const int kAutoHideDelayMS = 200; | 56 const int kAutoHideDelayMS = 200; |
| 59 | 57 |
| 60 // To avoid hiding the shelf when the mouse transitions from a message bubble | 58 // To avoid hiding the shelf when the mouse transitions from a message bubble |
| 61 // into the shelf, the hit test area is enlarged by this amount of pixels to | 59 // into the shelf, the hit test area is enlarged by this amount of pixels to |
| 62 // keep the shelf from hiding. | 60 // keep the shelf from hiding. |
| 63 const int kNotificationBubbleGapHeight = 6; | 61 const int kNotificationBubbleGapHeight = 6; |
| 64 | 62 |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 // Hide the status area widget (using auto hide animation). | 1175 // Hide the status area widget (using auto hide animation). |
| 1178 base::AutoReset<ShelfVisibilityState> state(&state_.visibility_state, | 1176 base::AutoReset<ShelfVisibilityState> state(&state_.visibility_state, |
| 1179 SHELF_HIDDEN); | 1177 SHELF_HIDDEN); |
| 1180 TargetBounds target_bounds; | 1178 TargetBounds target_bounds; |
| 1181 CalculateTargetBounds(state_, &target_bounds); | 1179 CalculateTargetBounds(state_, &target_bounds); |
| 1182 UpdateBoundsAndOpacity(target_bounds, true, NULL); | 1180 UpdateBoundsAndOpacity(target_bounds, true, NULL); |
| 1183 UpdateVisibilityState(); | 1181 UpdateVisibilityState(); |
| 1184 } | 1182 } |
| 1185 } | 1183 } |
| 1186 | 1184 |
| 1187 } // namespace internal | |
| 1188 } // namespace ash | 1185 } // namespace ash |
| OLD | NEW |