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/system_modal_container_layout_manager.h" | 5 #include "ash/wm/system_modal_container_layout_manager.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual ~EventTestWindow() {} | 74 virtual ~EventTestWindow() {} |
75 | 75 |
76 aura::Window* OpenTestWindow(aura::Window* parent) { | 76 aura::Window* OpenTestWindow(aura::Window* parent) { |
77 views::Widget* widget = | 77 views::Widget* widget = |
78 views::Widget::CreateWindowWithParent(this, parent); | 78 views::Widget::CreateWindowWithParent(this, parent); |
79 widget->Show(); | 79 widget->Show(); |
80 return widget->GetNativeView(); | 80 return widget->GetNativeView(); |
81 } | 81 } |
82 | 82 |
83 // Overridden from views::View: | 83 // Overridden from views::View: |
84 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { | 84 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { |
85 mouse_presses_++; | 85 mouse_presses_++; |
86 return false; | 86 return false; |
87 } | 87 } |
88 | 88 |
89 int mouse_presses() const { return mouse_presses_; } | 89 int mouse_presses() const { return mouse_presses_; } |
90 private: | 90 private: |
91 int mouse_presses_; | 91 int mouse_presses_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(EventTestWindow); | 93 DISALLOW_COPY_AND_ASSIGN(EventTestWindow); |
94 }; | 94 }; |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 // We set now the bounds of the root window to something new which will | 343 // We set now the bounds of the root window to something new which will |
344 // Then trigger the repos operation. | 344 // Then trigger the repos operation. |
345 GetModalContainer()->SetBounds(gfx::Rect(0, 0, 800, 600)); | 345 GetModalContainer()->SetBounds(gfx::Rect(0, 0, 800, 600)); |
346 | 346 |
347 gfx::Rect bounds = main->bounds(); | 347 gfx::Rect bounds = main->bounds(); |
348 EXPECT_EQ(bounds, gfx::Rect(700, 500, 100, 100)); | 348 EXPECT_EQ(bounds, gfx::Rect(700, 500, 100, 100)); |
349 } | 349 } |
350 | 350 |
351 } // namespace test | 351 } // namespace test |
352 } // namespace ash | 352 } // namespace ash |
OLD | NEW |