| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_ | |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "ui/gfx/display.h" | |
| 10 #include "ui/gfx/screen.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class Rect; | |
| 14 class Transform; | |
| 15 } | |
| 16 | |
| 17 namespace mojo { | |
| 18 namespace service { | |
| 19 | |
| 20 // A minimal implementation of gfx::Screen for the view manager. | |
| 21 class ScreenImpl : public gfx::Screen { | |
| 22 public: | |
| 23 static gfx::Screen* Create(); | |
| 24 virtual ~ScreenImpl(); | |
| 25 | |
| 26 protected: | |
| 27 // gfx::Screen overrides: | |
| 28 virtual bool IsDIPEnabled() OVERRIDE; | |
| 29 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | |
| 30 virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE; | |
| 31 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) | |
| 32 OVERRIDE; | |
| 33 virtual int GetNumDisplays() const OVERRIDE; | |
| 34 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE; | |
| 35 virtual gfx::Display GetDisplayNearestWindow( | |
| 36 gfx::NativeView view) const OVERRIDE; | |
| 37 virtual gfx::Display GetDisplayNearestPoint( | |
| 38 const gfx::Point& point) const OVERRIDE; | |
| 39 virtual gfx::Display GetDisplayMatching( | |
| 40 const gfx::Rect& match_rect) const OVERRIDE; | |
| 41 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | |
| 42 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; | |
| 43 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; | |
| 44 | |
| 45 private: | |
| 46 explicit ScreenImpl(const gfx::Rect& screen_bounds); | |
| 47 | |
| 48 gfx::Display display_; | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(ScreenImpl); | |
| 51 }; | |
| 52 | |
| 53 } // namespace service | |
| 54 } // namespace mojo | |
| 55 | |
| 56 #endif // MOJO_SERVICES_VIEW_MANAGER_SCREEN_IMPL_H_ | |
| OLD | NEW |