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

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: (09.28.2016)Rebase on master 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 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..50c430ae27fa8be530c836784f5265cfe1ec1509
--- /dev/null
+++ b/ui/views/widget/desktop_aura/desktop_screen_wayland.h
@@ -0,0 +1,61 @@
+// 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 "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/public/ozone_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::OzonePlatformScreenDelegate {
+ public:
+ DesktopScreenWayland();
+ ~DesktopScreenWayland() override;
+
+ // ui::WaylandOutput::Observer overrides.
+ void OnOutputGeometryChanged(int32_t name, const gfx::Rect& rect) 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;
+
+ // 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_
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_factory_ozone_wayland.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698