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/ash_native_cursor_manager.h" | 5 #include "ash/wm/ash_native_cursor_manager.h" |
6 | 6 |
7 #include "ash/display/display_info.h" | 7 #include "ash/display/display_info.h" |
8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 public: | 37 public: |
38 MouseEventLocationDelegate() {} | 38 MouseEventLocationDelegate() {} |
39 virtual ~MouseEventLocationDelegate() {} | 39 virtual ~MouseEventLocationDelegate() {} |
40 | 40 |
41 gfx::Point GetMouseEventLocationAndReset() { | 41 gfx::Point GetMouseEventLocationAndReset() { |
42 gfx::Point p = mouse_event_location_; | 42 gfx::Point p = mouse_event_location_; |
43 mouse_event_location_.SetPoint(-100, -100); | 43 mouse_event_location_.SetPoint(-100, -100); |
44 return p; | 44 return p; |
45 } | 45 } |
46 | 46 |
47 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE { | 47 virtual void OnMouseEvent(ui::MouseEvent* event) override { |
48 mouse_event_location_ = event->location(); | 48 mouse_event_location_ = event->location(); |
49 event->SetHandled(); | 49 event->SetHandled(); |
50 } | 50 } |
51 | 51 |
52 private: | 52 private: |
53 gfx::Point mouse_event_location_; | 53 gfx::Point mouse_event_location_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(MouseEventLocationDelegate); | 55 DISALLOW_COPY_AND_ASSIGN(MouseEventLocationDelegate); |
56 }; | 56 }; |
57 | 57 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 loader.set_scale(2.0f); | 201 loader.set_scale(2.0f); |
202 loader.LoadImageCursor(kCursorId, IDR_AURA_CURSOR_MOVE, gfx::Point()); | 202 loader.LoadImageCursor(kCursorId, IDR_AURA_CURSOR_MOVE, gfx::Point()); |
203 image = loader.GetXcursorImageForTest(kCursorId); | 203 image = loader.GetXcursorImageForTest(kCursorId); |
204 EXPECT_EQ(height * 2, static_cast<int>(image->height)); | 204 EXPECT_EQ(height * 2, static_cast<int>(image->height)); |
205 EXPECT_EQ(width * 2, static_cast<int>(image->width)); | 205 EXPECT_EQ(width * 2, static_cast<int>(image->width)); |
206 } | 206 } |
207 #endif | 207 #endif |
208 | 208 |
209 } // namespace test | 209 } // namespace test |
210 } // namespace ash | 210 } // namespace ash |
OLD | NEW |