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

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

Issue 10836046: Allow offset for secondary display position in chrome://settings/display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/display/display_controller.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 (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 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_
6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Returns all oot window controllers. In non extended desktop 63 // Returns all oot window controllers. In non extended desktop
64 // mode, this return a RootWindowController for the primary root window only. 64 // mode, this return a RootWindowController for the primary root window only.
65 std::vector<internal::RootWindowController*> GetAllRootWindowControllers(); 65 std::vector<internal::RootWindowController*> GetAllRootWindowControllers();
66 66
67 SecondaryDisplayLayout secondary_display_layout() const { 67 SecondaryDisplayLayout secondary_display_layout() const {
68 return secondary_display_layout_; 68 return secondary_display_layout_;
69 } 69 }
70 void SetSecondaryDisplayLayout(SecondaryDisplayLayout layout); 70 void SetSecondaryDisplayLayout(SecondaryDisplayLayout layout);
71 71
72 int secondary_display_offset() const {
73 return secondary_display_offset_;
74 }
75 void SetSecondaryDisplayOffset(int offset);
76
72 void set_dont_warp_mouse(bool dont_warp_mouse) { 77 void set_dont_warp_mouse(bool dont_warp_mouse) {
73 dont_warp_mouse_ = dont_warp_mouse; 78 dont_warp_mouse_ = dont_warp_mouse;
74 } 79 }
75 80
76 // Warps the mouse cursor to an alternate root window when the 81 // Warps the mouse cursor to an alternate root window when the
77 // |point_in_root|, which is the location of the mouse cursor, 82 // |point_in_root|, which is the location of the mouse cursor,
78 // hits or exceeds the edge of the |root_window| and the mouse cursor 83 // hits or exceeds the edge of the |root_window| and the mouse cursor
79 // is considered to be in an alternate display. Returns true if 84 // is considered to be in an alternate display. Returns true if
80 // the cursor was moved. 85 // the cursor was moved.
81 bool WarpMouseCursorIfNecessary(aura::RootWindow* root_window, 86 bool WarpMouseCursorIfNecessary(aura::RootWindow* root_window,
(...skipping 14 matching lines...) Expand all
96 // Creates a root window for |display| and stores it in the |root_windows_| 101 // Creates a root window for |display| and stores it in the |root_windows_|
97 // map. 102 // map.
98 aura::RootWindow* AddRootWindowForDisplay(const gfx::Display& display); 103 aura::RootWindow* AddRootWindowForDisplay(const gfx::Display& display);
99 104
100 void UpdateDisplayBoundsForLayout(); 105 void UpdateDisplayBoundsForLayout();
101 106
102 std::map<int, aura::RootWindow*> root_windows_; 107 std::map<int, aura::RootWindow*> root_windows_;
103 108
104 SecondaryDisplayLayout secondary_display_layout_; 109 SecondaryDisplayLayout secondary_display_layout_;
105 110
111 // The offset of the position of the secondary display. The offset is
112 // based on the top/left edge of the primary display.
113 int secondary_display_offset_;
114
106 // If true, the mouse pointer can't move from one display to another. 115 // If true, the mouse pointer can't move from one display to another.
107 bool dont_warp_mouse_; 116 bool dont_warp_mouse_;
108 117
109 DISALLOW_COPY_AND_ASSIGN(DisplayController); 118 DISALLOW_COPY_AND_ASSIGN(DisplayController);
110 }; 119 };
111 120
112 } // namespace internal 121 } // namespace internal
113 } // namespace ash 122 } // namespace ash
114 123
115 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 124 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698