Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_screen_wayland.h |
| diff --git a/ui/views/widget/desktop_aura/desktop_screen_wayland.h b/ui/views/widget/desktop_aura/desktop_screen_wayland.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7e2476e44ff71a6006de460e9337616ed307f2d6 |
| --- /dev/null |
| +++ b/ui/views/widget/desktop_aura/desktop_screen_wayland.h |
| @@ -0,0 +1,69 @@ |
| +// 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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_ |
| +#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_ |
| + |
| + |
| +#include <memory> |
| + |
|
tonikitoo
2016/06/06 15:29:59
nit: drop empty line.
joone
2016/06/06 18:22:22
Acknowledged.
|
| +#include <vector> |
| + |
| +#include "ui/display/display.h" |
| +#include "ui/display/display_change_notifier.h" |
| +#include "ui/display/screen.h" |
| +#include "ui/gfx/geometry/rect.h" |
| +#include "ui/ozone/platform/wayland/desktop_platform_screen_delegate.h" |
| +#include "ui/views/views_export.h" |
| + |
| +namespace aura { |
| +class Window; |
| +} |
| + |
| +namespace views { |
| + |
| +class VIEWS_EXPORT DesktopScreenWayland |
| + : public display::Screen, |
| + public ui::DesktopPlatformScreenDelegate { |
| + public: |
| + DesktopScreenWayland(); |
| + ~DesktopScreenWayland() override; |
| + |
| + // DesktopPlatformScreenDelegate overrides. |
| + void OnOutputSizeChanged(int32_t name, unsigned width, |
| + unsigned height) override; |
| + |
| + private: |
| + void SetGeometry(int32_t name, const gfx::Rect& geometry); |
| + |
| + // Overridden from display::Screen: |
| + gfx::Point GetCursorScreenPoint() override; |
| + bool IsWindowUnderCursor(gfx::NativeWindow) override; |
| + gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point&) override; |
| + int GetNumDisplays() const override; |
| + std::vector<display::Display> GetAllDisplays() const override; |
| + display::Display GetDisplayNearestWindow( |
| + gfx::NativeView) const override; |
| + display::Display GetDisplayNearestPoint( |
| + const gfx::Point&) const override; |
| + display::Display GetDisplayMatching( |
| + const gfx::Rect&) const override; |
| + display::Display GetPrimaryDisplay() const override; |
| + void AddObserver(display::DisplayObserver*) override; |
| + void RemoveObserver(display::DisplayObserver*) override; |
| + |
| + // The display objects we present to chrome. |
| + std::vector<display::Display> displays_; |
| + |
| + // Whether the output size is initialized. |
| + bool isOutputSizeInitialized; |
| + |
| + display::DisplayChangeNotifier change_notifier_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DesktopScreenWayland); |
| +}; |
| + |
| +} // namespace views |
| + |
| +#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_ |