| OLD | NEW |
| 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 } | 12 } |
| 13 | 13 |
| 14 namespace display { | 14 namespace display { |
| 15 | 15 |
| 16 class PlatformScreen; | 16 class PlatformScreen; |
| 17 | 17 |
| 18 // The PlatformScreenDelegate will be informed of changes to the physical | 18 // The PlatformScreenDelegate will be informed of changes to the physical |
| 19 // and/or virtual displays by PlatformScreen. | 19 // and/or virtual displays by PlatformScreen. |
| 20 class PlatformScreenDelegate { | 20 class PlatformScreenDelegate { |
| 21 public: | 21 public: |
| 22 // TODO(kylechar): We need to provide more than just the window bounds when | 22 // TODO(kylechar): We need to provide more than just the window bounds when |
| 23 // displays are added or modified. | 23 // displays are added or modified. |
| 24 | 24 |
| 25 // Called when a display is added. |bounds| is in DIP. | 25 // Called when a display is added. |bounds| is in DIP. |
| 26 virtual void OnDisplayAdded(PlatformScreen* platform_screen, | 26 virtual void OnDisplayAdded(int64_t id, const gfx::Rect& bounds) = 0; |
| 27 int64_t id, | |
| 28 const gfx::Rect& bounds) = 0; | |
| 29 | 27 |
| 30 // Called when a display is removed. | 28 // Called when a display is removed. |
| 31 virtual void OnDisplayRemoved(int64_t id) = 0; | 29 virtual void OnDisplayRemoved(int64_t id) = 0; |
| 32 | 30 |
| 33 // Called when a display is modified. |bounds| is in DIP. | 31 // Called when a display is modified. |bounds| is in DIP. |
| 34 virtual void OnDisplayModified(int64_t id, const gfx::Rect& bounds) = 0; | 32 virtual void OnDisplayModified(int64_t id, const gfx::Rect& bounds) = 0; |
| 35 | 33 |
| 36 protected: | 34 protected: |
| 37 virtual ~PlatformScreenDelegate() {} | 35 virtual ~PlatformScreenDelegate() {} |
| 38 }; | 36 }; |
| 39 | 37 |
| 40 } // namespace display | 38 } // namespace display |
| 41 | 39 |
| 42 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ | 40 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ |
| OLD | NEW |