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

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

Issue 12505005: Store rotation/ui scale to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_INFO_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_INFO_H_
6 #define ASH_DISPLAY_DISPLAY_INFO_H_ 6 #define ASH_DISPLAY_DISPLAY_INFO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // that it has overscan (|has_overscan_| is true), then updates 110 // that it has overscan (|has_overscan_| is true), then updates
111 // |overscan_insets_in_dip_| to default value (5% of the display size) 111 // |overscan_insets_in_dip_| to default value (5% of the display size)
112 // and apply the insets. 112 // and apply the insets.
113 // 3) Otherwise, clear the overscan insets. 113 // 3) Otherwise, clear the overscan insets.
114 void UpdateDisplaySize(); 114 void UpdateDisplaySize();
115 115
116 // Sets/Clears the overscan insets. 116 // Sets/Clears the overscan insets.
117 void SetOverscanInsets(bool custom, 117 void SetOverscanInsets(bool custom,
118 const gfx::Insets& insets_in_dip); 118 const gfx::Insets& insets_in_dip);
119 gfx::Insets GetOverscanInsetsInPixel() const; 119 gfx::Insets GetOverscanInsetsInPixel() const;
120
120 void clear_has_custom_overscan_insets() { 121 void clear_has_custom_overscan_insets() {
121 has_custom_overscan_insets_ = false; 122 has_custom_overscan_insets_ = false;
122 } 123 }
123 124
125 bool has_custom_overscan_insets() const {
126 return has_custom_overscan_insets_;
127 }
128
124 // Returns a string representation of the DisplayInfo; 129 // Returns a string representation of the DisplayInfo;
125 std::string ToString() const; 130 std::string ToString() const;
126 131
127 private: 132 private:
128 FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, AutomaticOverscanInsets); 133 FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, AutomaticOverscanInsets);
129 // Set the overscan flag. Used for test. 134 // Set the overscan flag. Used for test.
130 void set_has_overscan_for_test(bool has_overscan) { 135 void set_has_overscan_for_test(bool has_overscan) {
131 has_overscan_ = has_overscan; 136 has_overscan_ = has_overscan;
132 } 137 }
133 138
(...skipping 13 matching lines...) Expand all
147 bool has_custom_overscan_insets_; 152 bool has_custom_overscan_insets_;
148 153
149 // UI scale of the display. 154 // UI scale of the display.
150 float ui_scale_; 155 float ui_scale_;
151 }; 156 };
152 157
153 } // namespace internal 158 } // namespace internal
154 } // namespace ash 159 } // namespace ash
155 160
156 #endif // ASH_DISPLAY_DISPLAY_INFO_H_ 161 #endif // ASH_DISPLAY_DISPLAY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698