Stop retring GCM unregistration requests after reaching maximum number
[chromium-blink-merge.git] / mandoline / ui / aura / screen_mojo.h
blob964c21adf9ece690ba5afccef07810e55c847887
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 MANDOLINE_UI_AURA_SCREEN_MOJO_H_
6 #define MANDOLINE_UI_AURA_SCREEN_MOJO_H_
8 #include "base/macros.h"
9 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h"
12 namespace gfx {
13 class Rect;
14 class Transform;
17 namespace mandoline {
19 // A minimal implementation of gfx::Screen for mojo.
20 class ScreenMojo : public gfx::Screen {
21 public:
22 static ScreenMojo* Create();
23 ~ScreenMojo() override;
25 protected:
26 // gfx::Screen overrides:
27 gfx::Point GetCursorScreenPoint() override;
28 gfx::NativeWindow GetWindowUnderCursor() override;
29 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
30 int GetNumDisplays() const override;
31 std::vector<gfx::Display> GetAllDisplays() const override;
32 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
33 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
34 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
35 gfx::Display GetPrimaryDisplay() const override;
36 void AddObserver(gfx::DisplayObserver* observer) override;
37 void RemoveObserver(gfx::DisplayObserver* observer) override;
39 private:
40 explicit ScreenMojo(const gfx::Rect& screen_bounds);
42 gfx::Display display_;
44 DISALLOW_COPY_AND_ASSIGN(ScreenMojo);
47 } // namespace mandoline
49 #endif // MANDOLINE_UI_AURA_SCREEN_MOJO_H_