Chromium Code Reviews| Index: ash/display/extended_mouse_warp_controller.h |
| diff --git a/ash/display/extended_mouse_warp_controller.h b/ash/display/extended_mouse_warp_controller.h |
| index fa65eed18495a8426ccd37d744139f2d7512d727..1126ef34aaf72ae662c57c4c8306871df3aa0998 100644 |
| --- a/ash/display/extended_mouse_warp_controller.h |
| +++ b/ash/display/extended_mouse_warp_controller.h |
| @@ -42,17 +42,16 @@ class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { |
| private: |
| friend class test::DisplayManagerTestApi; |
| + friend class ExtendedMouseWarpControllerTest; |
| FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
| - IndicatorBoundsTestOnRight); |
| - FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
| - IndicatorBoundsTestOnLeft); |
| + IndicatorBoundsTestThreeDisplays); |
| FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
| - IndicatorBoundsTestOnTopBottom); |
| + IndicatorBoundsTestThreeDisplaysWithLayout); |
| FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
| - IndicatorBoundsTestThreeDisplays); |
| + IndicatorBoundsTestThreeDisplaysWithLayout2); |
| // Defined in header file because tests need access. |
| - class WarpRegion { |
| + class ASH_EXPORT WarpRegion { |
| public: |
| WarpRegion(int64_t a_display_id, |
| int64_t b_display_id, |
| @@ -63,6 +62,8 @@ class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { |
| const gfx::Rect& a_indicator_bounds() { return a_indicator_bounds_; } |
| const gfx::Rect& b_indicator_bounds() { return b_indicator_bounds_; } |
| + const gfx::Rect& GetIndicatorBoundsForTest(int64_t id) const; |
| + |
| private: |
| friend class ExtendedMouseWarpController; |
| @@ -104,16 +105,14 @@ class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { |
| const gfx::Point& point_in_screen, |
| bool update_mouse_location_now); |
| - // Update the edge/indicator bounds based on the current |
| - // display configuration. |
| - scoped_ptr<WarpRegion> CreateHorizontalEdgeBounds( |
| - const gfx::Display& a, |
| - const gfx::Display& b, |
| - DisplayPlacement::Position position); |
| - scoped_ptr<WarpRegion> CreateVerticalEdgeBounds( |
| - const gfx::Display& a, |
| - const gfx::Display& b, |
| - DisplayPlacement::Position position); |
| + // Creates WarpRegion between display |a| and |
| + // |b|. |drag_source_dispaly_id| is used to indicate in which |
|
stevenjb
2016/03/24 18:08:30
nit: |b|. on prev line
oshima
2016/03/24 20:37:19
Done.
|
| + // display a drag is started, or invalid id passed if this is not |
| + // for dragging. Returns null scoped_ptr if two displays do not |
| + // share the edge. |
| + scoped_ptr<WarpRegion> CreateWarpRegion(const gfx::Display& a, |
| + const gfx::Display& b, |
| + int64_t drag_source_dispay_id); |
| void allow_non_native_event_for_test() { allow_non_native_event_ = true; } |