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

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

Powered by Google App Engine
This is Rietveld 408576698