Chromium Code Reviews| Index: services/ui/display/platform_screen_delegate.h |
| diff --git a/services/ui/display/platform_screen_delegate.h b/services/ui/display/platform_screen_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1b301ce26a2d662ece3478fc712518ed3475f80c |
| --- /dev/null |
| +++ b/services/ui/display/platform_screen_delegate.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ |
| +#define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ |
| + |
| +#include <stdint.h> |
| + |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +namespace display { |
| + |
| +class PlatformScreen; |
| + |
| +// The PlatformScreenDelegate will be informed of changes to the physical |
| +// and/or virtual displays by PlatformScreen. |
| +class PlatformScreenDelegate { |
| + public: |
| + // TODO(kylechar): We need to provide more than just the window bounds when |
| + // displays are added or modified. |
| + |
| + // Called when a display is added. |
| + virtual void OnDisplayAdded(PlatformScreen* platform_screen, |
| + int64_t id, |
| + const gfx::Rect& bounds) = 0; |
|
sky
2016/08/25 23:40:31
Please clarify what the units are here. DIP or pix
kylechar
2016/08/26 13:21:19
Done.
|
| + |
| + // Called when a display is removed. |
| + virtual void OnDisplayRemoved(int64_t id) = 0; |
| + |
| + // Called when a display is modified. |
| + virtual void OnDisplayModified(int64_t id, const gfx::Rect& bounds) = 0; |
| + |
| + protected: |
| + virtual ~PlatformScreenDelegate() {} |
| +}; |
| + |
| +} // namespace display |
| + |
| +#endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_DELEGATE_H_ |