OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_AURA_SCREEN_MOJO_H_ | 5 #ifndef CHROMECAST_UI_GFX_SCREEN_CAST_H_ |
6 #define MOJO_AURA_SCREEN_MOJO_H_ | 6 #define CHROMECAST_UI_GFX_SCREEN_CAST_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/gfx/display.h" | 9 #include "ui/gfx/display.h" |
10 #include "ui/gfx/screen.h" | 10 #include "ui/gfx/screen.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 class Transform; | 14 } // namespace gfx |
15 } | |
16 | 15 |
17 namespace mojo { | 16 namespace chromecast { |
18 | 17 |
19 // A minimal implementation of gfx::Screen for mojo. | 18 // A minimal implementation of gfx::Screen for chromecast. |
20 class ScreenMojo : public gfx::Screen { | 19 class ScreenCast : public gfx::Screen { |
21 public: | 20 public: |
22 static ScreenMojo* Create(); | 21 static ScreenCast* Create(const gfx::Size& size); |
23 virtual ~ScreenMojo(); | 22 virtual ~ScreenCast(); |
24 | 23 |
25 protected: | |
26 // gfx::Screen overrides: | 24 // gfx::Screen overrides: |
27 virtual bool IsDIPEnabled() OVERRIDE; | 25 virtual bool IsDIPEnabled() OVERRIDE; |
28 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 26 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
29 virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE; | 27 virtual gfx::NativeWindow GetWindowUnderCursor() OVERRIDE; |
30 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) | 28 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) |
31 OVERRIDE; | 29 OVERRIDE; |
32 virtual int GetNumDisplays() const OVERRIDE; | 30 virtual int GetNumDisplays() const OVERRIDE; |
33 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE; | 31 virtual std::vector<gfx::Display> GetAllDisplays() const OVERRIDE; |
34 virtual gfx::Display GetDisplayNearestWindow( | 32 virtual gfx::Display GetDisplayNearestWindow( |
35 gfx::NativeView view) const OVERRIDE; | 33 gfx::NativeView view) const OVERRIDE; |
36 virtual gfx::Display GetDisplayNearestPoint( | 34 virtual gfx::Display GetDisplayNearestPoint( |
37 const gfx::Point& point) const OVERRIDE; | 35 const gfx::Point& point) const OVERRIDE; |
38 virtual gfx::Display GetDisplayMatching( | 36 virtual gfx::Display GetDisplayMatching( |
39 const gfx::Rect& match_rect) const OVERRIDE; | 37 const gfx::Rect& match_rect) const OVERRIDE; |
40 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 38 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; |
41 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; | 39 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; |
42 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; | 40 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; |
43 | 41 |
44 private: | 42 private: |
45 explicit ScreenMojo(const gfx::Rect& screen_bounds); | 43 explicit ScreenCast(const gfx::Rect& screen_bounds); |
46 | 44 |
47 gfx::Display display_; | 45 gfx::Display display_; |
48 | 46 |
49 DISALLOW_COPY_AND_ASSIGN(ScreenMojo); | 47 DISALLOW_COPY_AND_ASSIGN(ScreenCast); |
50 }; | 48 }; |
51 | 49 |
52 } // namespace mojo | 50 } // namespace chromecast |
53 | 51 |
54 #endif // MOJO_AURA_SCREEN_MOJO_H_ | 52 #endif // CHROMECAST_UI_GFX_SCREEN_CAST_H_ |
OLD | NEW |