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

Side by Side Diff: services/ui/ws/platform_display.h

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: Fix more tests. Created 4 years, 3 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 | « services/ui/ws/frame_generator_delegate.h ('k') | services/ui/ws/platform_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 5 #ifndef SERVICES_UI_WS_PLATFORM_DISPLAY_H_
6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 6 #define SERVICES_UI_WS_PLATFORM_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void SetImeVisibility(bool visible) override; 136 void SetImeVisibility(bool visible) override;
137 bool IsFramePending() const override; 137 bool IsFramePending() const override;
138 void RequestCopyOfOutput( 138 void RequestCopyOfOutput(
139 std::unique_ptr<cc::CopyOutputRequest> output_request) override; 139 std::unique_ptr<cc::CopyOutputRequest> output_request) override;
140 gfx::Rect GetBounds() const override; 140 gfx::Rect GetBounds() const override;
141 bool IsPrimaryDisplay() const override; 141 bool IsPrimaryDisplay() const override;
142 void OnGpuChannelEstablished( 142 void OnGpuChannelEstablished(
143 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override; 143 scoped_refptr<gpu::GpuChannelHost> gpu_channel) override;
144 144
145 private: 145 private:
146 void UpdateMetrics(const gfx::Rect& bounds, float device_scale_factor); 146 void UpdateMetrics(const gfx::Rect& bounds,
147 const gfx::Size& pixel_size,
148 float device_scale_factor);
147 149
148 // Update the root_location of located events to be relative to the origin 150 // Update the root_location of located events to be relative to the origin
149 // of this display. For example, if the origin of this display is (1800, 0) 151 // of this display. For example, if the origin of this display is (1800, 0)
150 // and the location of the event is (100, 200) then the root_location will be 152 // and the location of the event is (100, 200) then the root_location will be
151 // updated to be (1900, 200). 153 // updated to be (1900, 200).
152 void UpdateEventRootLocation(ui::LocatedEvent* event); 154 void UpdateEventRootLocation(ui::LocatedEvent* event);
153 155
154 // ui::PlatformWindowDelegate: 156 // ui::PlatformWindowDelegate:
155 void OnBoundsChanged(const gfx::Rect& new_bounds) override; 157 void OnBoundsChanged(const gfx::Rect& new_bounds) override;
156 void OnDamageRect(const gfx::Rect& damaged_region) override; 158 void OnDamageRect(const gfx::Rect& damaged_region) override;
(...skipping 26 matching lines...) Expand all
183 std::unique_ptr<ui::PlatformWindow> platform_window_; 185 std::unique_ptr<ui::PlatformWindow> platform_window_;
184 186
185 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay); 187 DISALLOW_COPY_AND_ASSIGN(DefaultPlatformDisplay);
186 }; 188 };
187 189
188 } // namespace ws 190 } // namespace ws
189 191
190 } // namespace ui 192 } // namespace ui
191 193
192 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_ 194 #endif // SERVICES_UI_WS_PLATFORM_DISPLAY_H_
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator_delegate.h ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698