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 "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/accelerators/accelerator_table.h" | 8 #include "ash/accelerators/accelerator_table.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "base/command_line.h" | 27 #include "base/command_line.h" |
28 #include "base/strings/utf_string_conversions.h" | 28 #include "base/strings/utf_string_conversions.h" |
29 #include "ui/aura/client/aura_constants.h" | 29 #include "ui/aura/client/aura_constants.h" |
30 #include "ui/aura/test/event_generator.h" | 30 #include "ui/aura/test/event_generator.h" |
31 #include "ui/aura/window.h" | 31 #include "ui/aura/window.h" |
32 #include "ui/aura/window_event_dispatcher.h" | 32 #include "ui/aura/window_event_dispatcher.h" |
33 #include "ui/compositor/layer.h" | 33 #include "ui/compositor/layer.h" |
34 #include "ui/compositor/layer_animator.h" | 34 #include "ui/compositor/layer_animator.h" |
35 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 35 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
36 #include "ui/events/gestures/gesture_configuration.h" | 36 #include "ui/events/gestures/gesture_configuration.h" |
| 37 #include "ui/gfx/animation/animation_container_element.h" |
37 #include "ui/gfx/display.h" | 38 #include "ui/gfx/display.h" |
38 #include "ui/gfx/screen.h" | 39 #include "ui/gfx/screen.h" |
39 #include "ui/views/controls/label.h" | 40 #include "ui/views/controls/label.h" |
40 #include "ui/views/layout/fill_layout.h" | 41 #include "ui/views/layout/fill_layout.h" |
41 #include "ui/views/view.h" | 42 #include "ui/views/view.h" |
42 #include "ui/views/widget/widget.h" | 43 #include "ui/views/widget/widget.h" |
43 | 44 |
44 #if defined(OS_WIN) | 45 #if defined(OS_WIN) |
45 #include "base/win/windows_version.h" | 46 #include "base/win/windows_version.h" |
46 #endif | 47 #endif |
47 | 48 |
48 namespace ash { | 49 namespace ash { |
49 namespace { | 50 namespace { |
50 | 51 |
51 void StepWidgetLayerAnimatorToEnd(views::Widget* widget) { | 52 void StepWidgetLayerAnimatorToEnd(views::Widget* widget) { |
52 widget->GetNativeView()->layer()->GetAnimator()->Step( | 53 gfx::AnimationContainerElement* element = |
53 base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); | 54 static_cast<gfx::AnimationContainerElement*>( |
| 55 widget->GetNativeView()->layer()->GetAnimator()); |
| 56 element->Step(base::TimeTicks::Now() + base::TimeDelta::FromSeconds(1)); |
54 } | 57 } |
55 | 58 |
56 ShelfWidget* GetShelfWidget() { | 59 ShelfWidget* GetShelfWidget() { |
57 return Shell::GetPrimaryRootWindowController()->shelf(); | 60 return Shell::GetPrimaryRootWindowController()->shelf(); |
58 } | 61 } |
59 | 62 |
60 ShelfLayoutManager* GetShelfLayoutManager() { | 63 ShelfLayoutManager* GetShelfLayoutManager() { |
61 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); | 64 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); |
62 } | 65 } |
63 | 66 |
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2115 generator.MoveMouseTo(0, 399); | 2118 generator.MoveMouseTo(0, 399); |
2116 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); | 2119 shelf->SetAlignment(SHELF_ALIGNMENT_LEFT); |
2117 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); | 2120 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
2118 generator.ClickLeftButton(); | 2121 generator.ClickLeftButton(); |
2119 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); | 2122 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); |
2120 generator.ClickLeftButton(); | 2123 generator.ClickLeftButton(); |
2121 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); | 2124 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
2122 } | 2125 } |
2123 | 2126 |
2124 } // namespace ash | 2127 } // namespace ash |
OLD | NEW |