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

Side by Side Diff: ash/display/display_util.h

Issue 2282903003: Remove MouseWarpController construction from ash::DisplayManager (Closed)
Patch Set: rebased Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/display/display_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_
6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ 6 #define ASH_DISPLAY_DISPLAY_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <memory>
9
10 #include <set>
11 #include <utility>
12 #include <vector>
13 9
14 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
15 #include "base/memory/ref_counted.h" 11 #include "base/strings/string16.h"
16 #include "ui/display/manager/display_layout.h" 12
17 #include "ui/display/manager/managed_display_info.h" 13 namespace aura {
14 class Window;
15 }
18 16
19 namespace display { 17 namespace display {
20 class ManagedDisplayInfo; 18 class ManagedDisplayInfo;
21 } 19 }
22 20
23 namespace gfx { 21 namespace gfx {
24 class Point; 22 class Point;
25 class Rect; 23 class Rect;
26 class Size;
27 } 24 }
28 25
29 namespace ui {}
30
31 namespace ash { 26 namespace ash {
32 class AshWindowTreeHost; 27 class AshWindowTreeHost;
28 class DisplayManager;
29 class MouseWarpController;
30
31 // Creates a MouseWarpController for the current display
32 // configuration. |drag_source| is the window where dragging
33 // started, or nullptr otherwise.
34 std::unique_ptr<MouseWarpController> CreateMouseWarpController(
35 DisplayManager* manager,
36 aura::Window* drag_source);
33 37
34 // TODO(rjkroege): Move this into display_manager.h 38 // TODO(rjkroege): Move this into display_manager.h
35 // Sets the UI scale for the |display_id|. Returns false if the 39 // Sets the UI scale for the |display_id|. Returns false if the
36 // display_id is not an internal display. 40 // display_id is not an internal display.
37 ASH_EXPORT bool SetDisplayUIScale(int64_t display_id, float scale); 41 ASH_EXPORT bool SetDisplayUIScale(int64_t display_id, float scale);
38 42
39 // Creates edge bounds from |bounds_in_screen| that fits the edge 43 // Creates edge bounds from |bounds_in_screen| that fits the edge
40 // of the native window for |ash_host|. 44 // of the native window for |ash_host|.
41 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, 45 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host,
42 const gfx::Rect& bounds_in_screen); 46 const gfx::Rect& bounds_in_screen);
43 47
44 // Moves the cursor to the point inside the |ash_host| that is closest to 48 // Moves the cursor to the point inside the |ash_host| that is closest to
45 // the point_in_screen, which may be outside of the root window. 49 // the point_in_screen, which may be outside of the root window.
46 // |update_last_loation_now| is used for the test to update the mouse 50 // |update_last_loation_now| is used for the test to update the mouse
47 // location synchronously. 51 // location synchronously.
48 void MoveCursorTo(AshWindowTreeHost* ash_host, 52 void MoveCursorTo(AshWindowTreeHost* ash_host,
49 const gfx::Point& point_in_screen, 53 const gfx::Point& point_in_screen,
50 bool update_last_location_now); 54 bool update_last_location_now);
51 55
52 #if defined(OS_CHROMEOS) 56 #if defined(OS_CHROMEOS)
53 // Shows the notification message for display related issues. 57 // Shows the notification message for display related issues.
54 void ShowDisplayErrorNotification(int message_id); 58 void ShowDisplayErrorNotification(int message_id);
55 #endif 59 #endif
56 60
57 ASH_EXPORT base::string16 GetDisplayErrorNotificationMessageForTest(); 61 ASH_EXPORT base::string16 GetDisplayErrorNotificationMessageForTest();
58 62
59 } // namespace ash 63 } // namespace ash
60 64
61 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ 65 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_
OLDNEW
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/display/display_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698