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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_
7
8
9 #include <memory>
10
tonikitoo 2016/06/06 15:29:59 nit: drop empty line.
joone 2016/06/06 18:22:22 Acknowledged.
11 #include <vector>
12
13 #include "ui/display/display.h"
14 #include "ui/display/display_change_notifier.h"
15 #include "ui/display/screen.h"
16 #include "ui/gfx/geometry/rect.h"
17 #include "ui/ozone/platform/wayland/desktop_platform_screen_delegate.h"
18 #include "ui/views/views_export.h"
19
20 namespace aura {
21 class Window;
22 }
23
24 namespace views {
25
26 class VIEWS_EXPORT DesktopScreenWayland
27 : public display::Screen,
28 public ui::DesktopPlatformScreenDelegate {
29 public:
30 DesktopScreenWayland();
31 ~DesktopScreenWayland() override;
32
33 // DesktopPlatformScreenDelegate overrides.
34 void OnOutputSizeChanged(int32_t name, unsigned width,
35 unsigned height) override;
36
37 private:
38 void SetGeometry(int32_t name, const gfx::Rect& geometry);
39
40 // Overridden from display::Screen:
41 gfx::Point GetCursorScreenPoint() override;
42 bool IsWindowUnderCursor(gfx::NativeWindow) override;
43 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point&) override;
44 int GetNumDisplays() const override;
45 std::vector<display::Display> GetAllDisplays() const override;
46 display::Display GetDisplayNearestWindow(
47 gfx::NativeView) const override;
48 display::Display GetDisplayNearestPoint(
49 const gfx::Point&) const override;
50 display::Display GetDisplayMatching(
51 const gfx::Rect&) const override;
52 display::Display GetPrimaryDisplay() const override;
53 void AddObserver(display::DisplayObserver*) override;
54 void RemoveObserver(display::DisplayObserver*) override;
55
56 // The display objects we present to chrome.
57 std::vector<display::Display> displays_;
58
59 // Whether the output size is initialized.
60 bool isOutputSizeInitialized;
61
62 display::DisplayChangeNotifier change_notifier_;
63
64 DISALLOW_COPY_AND_ASSIGN(DesktopScreenWayland);
65 };
66
67 } // namespace views
68
69 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_WAYLAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698