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

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

Issue 289583002: Lock rotation when screen is manually rotated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define sources for rotation Created 6 years, 7 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
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_MANAGER_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_
6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/display/display_info.h" 12 #include "ash/display/display_info.h"
13 #include "ash/display/display_layout.h" 13 #include "ash/display/display_layout.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "ui/display/types/display_constants.h"
17 #include "ui/gfx/display.h" 18 #include "ui/gfx/display.h"
18 19
19 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
20 #include "ui/display/chromeos/display_configurator.h" 21 #include "ui/display/chromeos/display_configurator.h"
21 #endif 22 #endif
22 23
23 namespace gfx { 24 namespace gfx {
24 class Display; 25 class Display;
25 class Insets; 26 class Insets;
26 class Rect; 27 class Rect;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 153
153 // Sets the work area's |insets| to the display given by |display_id|. 154 // Sets the work area's |insets| to the display given by |display_id|.
154 bool UpdateWorkAreaOfDisplay(int64 display_id, const gfx::Insets& insets); 155 bool UpdateWorkAreaOfDisplay(int64 display_id, const gfx::Insets& insets);
155 156
156 // Registers the overscan insets for the display of the specified ID. Note 157 // Registers the overscan insets for the display of the specified ID. Note
157 // that the insets size should be specified in DIP size. It also triggers the 158 // that the insets size should be specified in DIP size. It also triggers the
158 // display's bounds change. 159 // display's bounds change.
159 void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip); 160 void SetOverscanInsets(int64 display_id, const gfx::Insets& insets_in_dip);
160 161
161 // Sets the display's rotation. 162 // Sets the display's rotation.
162 void SetDisplayRotation(int64 display_id, gfx::Display::Rotation rotation); 163 void SetDisplayRotation(int64 display_id, gfx::Display::Rotation rotation,
164 ui::RotationSource source);
163 165
164 // Sets the display's ui scale. 166 // Sets the display's ui scale.
165 void SetDisplayUIScale(int64 display_id, float ui_scale); 167 void SetDisplayUIScale(int64 display_id, float ui_scale);
166 168
167 // Sets the display's resolution. 169 // Sets the display's resolution.
168 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution); 170 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution);
169 171
170 // Register per display properties. |overscan_insets| is NULL if 172 // Register per display properties. |overscan_insets| is NULL if
171 // the display has no custom overscan insets. 173 // the display has no custom overscan insets.
172 void RegisterDisplayProperty(int64 display_id, 174 void RegisterDisplayProperty(int64 display_id,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 SecondDisplayMode second_display_mode_; 362 SecondDisplayMode second_display_mode_;
361 int64 mirrored_display_id_; 363 int64 mirrored_display_id_;
362 gfx::Display non_desktop_display_; 364 gfx::Display non_desktop_display_;
363 365
364 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 366 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
365 }; 367 };
366 368
367 } // namespace ash 369 } // namespace ash
368 370
369 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ 371 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698