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

Side by Side Diff: ui/display/display.h

Issue 2207043002: SetDeviceScaleFactorForTest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetDeviceScaleFactorForTest Created 4 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
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/display/display.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 UI_DISPLAY_DISPLAY_H_ 5 #ifndef UI_DISPLAY_DISPLAY_H_
6 #define UI_DISPLAY_DISPLAY_H_ 6 #define UI_DISPLAY_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ~Display(); 74 ~Display();
75 75
76 // Returns the forced device scale factor, which is given by 76 // Returns the forced device scale factor, which is given by
77 // "--force-device-scale-factor". 77 // "--force-device-scale-factor".
78 static float GetForcedDeviceScaleFactor(); 78 static float GetForcedDeviceScaleFactor();
79 79
80 // Indicates if a device scale factor is being explicitly enforced from the 80 // Indicates if a device scale factor is being explicitly enforced from the
81 // command line via "--force-device-scale-factor". 81 // command line via "--force-device-scale-factor".
82 static bool HasForceDeviceScaleFactor(); 82 static bool HasForceDeviceScaleFactor();
83 83
84 // Sets the forced device scale factor.
85 static void SetForceDeviceScaleFactorForTesting(float scale_factor);
86
84 // Resets the caches used to determine if a device scale factor is being 87 // Resets the caches used to determine if a device scale factor is being
85 // forced from the command line via "--force-device-scale-factor", and thus 88 // forced from the command line via "--force-device-scale-factor", and thus
86 // ensures that the command line is reevaluated. 89 // ensures that the command line is reevaluated.
87 static void ResetForceDeviceScaleFactorForTesting(); 90 static void ResetForceDeviceScaleFactorForTesting();
88 91
89 // Sets/Gets unique identifier associated with the display. 92 // Sets/Gets unique identifier associated with the display.
90 // -1 means invalid display and it doesn't not exit. 93 // -1 means invalid display and it doesn't not exit.
91 int64_t id() const { return id_; } 94 int64_t id() const { return id_; }
92 void set_id(int64_t id) { id_ = id; } 95 void set_id(int64_t id) { id_ = id; }
93 96
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 int depth_per_component_; 189 int depth_per_component_;
187 190
188 #if !defined(OS_IOS) 191 #if !defined(OS_IOS)
189 friend struct mojo::StructTraits<display::mojom::Display, display::Display>; 192 friend struct mojo::StructTraits<display::mojom::Display, display::Display>;
190 #endif 193 #endif
191 }; 194 };
192 195
193 } // namespace display 196 } // namespace display
194 197
195 #endif // UI_DISPLAY_DISPLAY_H_ 198 #endif // UI_DISPLAY_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host.cc ('k') | ui/display/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698