Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1975)

Unified Diff: ash/display/extended_mouse_warp_controller.h

Issue 1823913002: Allow moving cursors between connected displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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; }

Powered by Google App Engine
This is Rietveld 408576698