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

Side by Side Diff: services/ui/display/platform_screen_delegate.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/display/OWNERS ('k') | services/ui/display/platform_screen_ozone.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_
6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 namespace gfx { 10 namespace gfx {
11 class Rect; 11 class Rect;
12 class Size;
12 } 13 }
13 14
14 namespace display { 15 namespace display {
15 16
16 class PlatformScreen; 17 class PlatformScreen;
17 18
18 // The PlatformScreenDelegate will be informed of changes to the physical 19 // The PlatformScreenDelegate will be informed of changes to the physical
19 // and/or virtual displays by PlatformScreen. 20 // and/or virtual displays by PlatformScreen.
20 class PlatformScreenDelegate { 21 class PlatformScreenDelegate {
21 public: 22 public:
22 // TODO(kylechar): We need to provide more than just the window bounds when 23 // Called when a display is added. |id| is the display id for the new display,
23 // displays are added or modified. 24 // |bounds| is the display origin and size in DIP, |pixel_size| is the size
25 // of the display in DDP and |device_scale_factor| is the output device pixel
26 // scale factor.
27 virtual void OnDisplayAdded(int64_t id,
28 const gfx::Rect& bounds,
29 const gfx::Size& pixel_size,
30 float device_scale_factor) = 0;
24 31
25 // Called when a display is added. |bounds| is in DIP. 32 // Called when a display is removed. |id| is the display id for the display
26 virtual void OnDisplayAdded(int64_t id, const gfx::Rect& bounds) = 0; 33 // that was removed.
27
28 // Called when a display is removed.
29 virtual void OnDisplayRemoved(int64_t id) = 0; 34 virtual void OnDisplayRemoved(int64_t id) = 0;
30 35
31 // Called when a display is modified. |bounds| is in DIP. 36 // Called when a display is modified. See OnDisplayAdded() for parameter
32 virtual void OnDisplayModified(int64_t id, const gfx::Rect& bounds) = 0; 37 // information.
38 virtual void OnDisplayModified(int64_t id,
39 const gfx::Rect& bounds,
40 const gfx::Size& pixel_size,
41 float device_scale_factor) = 0;
33 42
34 protected: 43 protected:
35 virtual ~PlatformScreenDelegate() {} 44 virtual ~PlatformScreenDelegate() {}
36 }; 45 };
37 46
38 } // namespace display 47 } // namespace display
39 48
40 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ 49 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_
OLDNEW
« no previous file with comments | « services/ui/display/OWNERS ('k') | services/ui/display/platform_screen_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698