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/wm/toplevel_window_event_handler.h" | 5 #include "ash/wm/toplevel_window_event_handler.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 public: | 60 public: |
61 ToplevelWindowEventHandlerTest() {} | 61 ToplevelWindowEventHandlerTest() {} |
62 ~ToplevelWindowEventHandlerTest() override {} | 62 ~ToplevelWindowEventHandlerTest() override {} |
63 | 63 |
64 protected: | 64 protected: |
65 aura::Window* CreateWindow(int hittest_code) { | 65 aura::Window* CreateWindow(int hittest_code) { |
66 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); | 66 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); |
67 aura::Window* w1 = new aura::Window(d1); | 67 aura::Window* w1 = new aura::Window(d1); |
68 w1->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 68 w1->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
69 w1->set_id(1); | 69 w1->set_id(1); |
70 w1->Init(aura::WINDOW_LAYER_TEXTURED); | 70 w1->Init(ui::LAYER_TEXTURED); |
71 aura::Window* parent = Shell::GetContainer( | 71 aura::Window* parent = Shell::GetContainer( |
72 Shell::GetPrimaryRootWindow(), kShellWindowId_AlwaysOnTopContainer); | 72 Shell::GetPrimaryRootWindow(), kShellWindowId_AlwaysOnTopContainer); |
73 parent->AddChild(w1); | 73 parent->AddChild(w1); |
74 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 74 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
75 w1->Show(); | 75 w1->Show(); |
76 return w1; | 76 return w1; |
77 } | 77 } |
78 | 78 |
79 void DragFromCenterBy(aura::Window* window, int dx, int dy) { | 79 void DragFromCenterBy(aura::Window* window, int dx, int dy) { |
80 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window); | 80 ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window); |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 EXPECT_EQ(aura::client::MOVE_SUCCESSFUL, | 723 EXPECT_EQ(aura::client::MOVE_SUCCESSFUL, |
724 move_client->RunMoveLoop(window.get(), gfx::Vector2d(), | 724 move_client->RunMoveLoop(window.get(), gfx::Vector2d(), |
725 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 725 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
726 } | 726 } |
727 | 727 |
728 // Showing the resize shadows when the mouse is over the window edges is tested | 728 // Showing the resize shadows when the mouse is over the window edges is tested |
729 // in resize_shadow_and_cursor_test.cc | 729 // in resize_shadow_and_cursor_test.cc |
730 | 730 |
731 } // namespace test | 731 } // namespace test |
732 } // namespace ash | 732 } // namespace ash |
OLD | NEW |