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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 public: | 62 public: |
63 ToplevelWindowEventHandlerTest() {} | 63 ToplevelWindowEventHandlerTest() {} |
64 virtual ~ToplevelWindowEventHandlerTest() {} | 64 virtual ~ToplevelWindowEventHandlerTest() {} |
65 | 65 |
66 protected: | 66 protected: |
67 aura::Window* CreateWindow(int hittest_code) { | 67 aura::Window* CreateWindow(int hittest_code) { |
68 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); | 68 TestWindowDelegate* d1 = new TestWindowDelegate(hittest_code); |
69 aura::Window* w1 = new aura::Window(d1); | 69 aura::Window* w1 = new aura::Window(d1); |
70 w1->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 70 w1->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
71 w1->set_id(1); | 71 w1->set_id(1); |
72 w1->Init(ui::LAYER_TEXTURED); | 72 w1->Init(aura::WINDOW_LAYER_TEXTURED); |
73 aura::Window* parent = | 73 aura::Window* parent = |
74 Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 74 Shell::GetContainer(Shell::GetPrimaryRootWindow(), |
75 internal::kShellWindowId_AlwaysOnTopContainer); | 75 internal::kShellWindowId_AlwaysOnTopContainer); |
76 parent->AddChild(w1); | 76 parent->AddChild(w1); |
77 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 77 w1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
78 w1->Show(); | 78 w1->Show(); |
79 return w1; | 79 return w1; |
80 } | 80 } |
81 | 81 |
82 void DragFromCenterBy(aura::Window* window, int dx, int dy) { | 82 void DragFromCenterBy(aura::Window* window, int dx, int dy) { |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 move_client->RunMoveLoop(window2.get(), gfx::Vector2d(), | 713 move_client->RunMoveLoop(window2.get(), gfx::Vector2d(), |
714 aura::client::WINDOW_MOVE_SOURCE_MOUSE); | 714 aura::client::WINDOW_MOVE_SOURCE_MOUSE); |
715 EXPECT_EQ(window1_initial_bounds.ToString(), window1->bounds().ToString()); | 715 EXPECT_EQ(window1_initial_bounds.ToString(), window1->bounds().ToString()); |
716 } | 716 } |
717 | 717 |
718 // Showing the resize shadows when the mouse is over the window edges is tested | 718 // Showing the resize shadows when the mouse is over the window edges is tested |
719 // in resize_shadow_and_cursor_test.cc | 719 // in resize_shadow_and_cursor_test.cc |
720 | 720 |
721 } // namespace test | 721 } // namespace test |
722 } // namespace ash | 722 } // namespace ash |
OLD | NEW |