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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_wayland.h

Issue 2027943002: [WIP] Make content_shell run under Wayland Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on tonikitoo's CL (included) Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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..4882bff5fa6cb153a018e5e429590eee960a5176
--- /dev/null
+++ b/ui/views/widget/desktop_aura/desktop_screen_wayland.h
@@ -0,0 +1,59 @@
+// 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>
+#include <vector>
+
+#include "base/run_loop.h"
+#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/views/views_export.h"
+
+namespace aura {
+class Window;
+}
+
+namespace views {
+
+class VIEWS_EXPORT DesktopScreenWayland
+ : public display::Screen {
+ public:
+ DesktopScreenWayland();
+ ~DesktopScreenWayland() override;
+
+ private:
+ // 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;
+ void OnOutputGeometryChanged(int32_t name, const gfx::Rect&) override;
+ void WaitForScreenSizeAvailable() override;
+
+ // The display objects we present to chrome.
+ std::vector<display::Display> displays_;
+
+ display::DisplayChangeNotifier change_notifier_;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopScreenWayland);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_

Powered by Google App Engine
This is Rietveld 408576698