Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / mojo / init / screen_mojo.h
blobdb7f48f75f9e37d47674162b5ff46b933e53d243
1 // Copyright 2015 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.
5 #ifndef UI_MOJO_INIT_SCREEN_MOJO_H_
6 #define UI_MOJO_INIT_SCREEN_MOJO_H_
8 #include "ui/gfx/display.h"
9 #include "ui/gfx/geometry/size.h"
10 #include "ui/gfx/screen.h"
12 namespace ui {
13 namespace mojo {
15 class ScreenMojo : public gfx::Screen {
16 public:
17 ScreenMojo(const gfx::Size& screen_size_in_pixels, float device_pixel_ratio);
19 // gfx::Screen:
20 gfx::Point GetCursorScreenPoint() override;
21 gfx::NativeWindow GetWindowUnderCursor() override;
22 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
23 gfx::Display GetPrimaryDisplay() const override;
24 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
25 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
26 int GetNumDisplays() const override;
27 std::vector<gfx::Display> GetAllDisplays() const override;
28 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
29 void AddObserver(gfx::DisplayObserver* observer) override;
30 void RemoveObserver(gfx::DisplayObserver* observer) override;
32 private:
33 const gfx::Size screen_size_in_pixels_;
34 const float device_pixel_ratio_;
36 gfx::Display display_;
38 DISALLOW_COPY_AND_ASSIGN(ScreenMojo);
41 } // namespace mojo
42 } // namespace ui
44 #endif // UI_MOJO_INIT_SCREEN_MOJO_H_