OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #include "chromecast/graphics/cast_screen.h" | 5 #include "chromecast/graphics/cast_screen.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
10 #include "ui/display/screen.h" | 10 #include "ui/display/screen.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 void CastScreen::UpdateDisplaySize(const gfx::Size& size) { | 41 void CastScreen::UpdateDisplaySize(const gfx::Size& size) { |
42 display_.SetScaleAndBounds(1.0f, gfx::Rect(size)); | 42 display_.SetScaleAndBounds(1.0f, gfx::Rect(size)); |
43 if (!display_resize_cb_.is_null()) | 43 if (!display_resize_cb_.is_null()) |
44 display_resize_cb_.Run(Size(size.width(), size.height())); | 44 display_resize_cb_.Run(Size(size.width(), size.height())); |
45 } | 45 } |
46 | 46 |
47 gfx::Point CastScreen::GetCursorScreenPoint() { | 47 gfx::Point CastScreen::GetCursorScreenPoint() { |
48 return aura::Env::GetInstance()->last_mouse_location(); | 48 return aura::Env::GetInstance()->last_mouse_location(); |
49 } | 49 } |
50 | 50 |
51 gfx::NativeWindow CastScreen::GetWindowUnderCursor() { | 51 bool CastScreen::IsWindowUnderCursor(gfx::NativeWindow window) { |
52 NOTIMPLEMENTED(); | 52 NOTIMPLEMENTED(); |
53 return gfx::NativeWindow(nullptr); | 53 return false; |
54 } | 54 } |
55 | 55 |
56 gfx::NativeWindow CastScreen::GetWindowAtScreenPoint(const gfx::Point& point) { | 56 gfx::NativeWindow CastScreen::GetWindowAtScreenPoint(const gfx::Point& point) { |
57 return gfx::NativeWindow(nullptr); | 57 return gfx::NativeWindow(nullptr); |
58 } | 58 } |
59 | 59 |
60 int CastScreen::GetNumDisplays() const { | 60 int CastScreen::GetNumDisplays() const { |
61 return 1; | 61 return 1; |
62 } | 62 } |
63 | 63 |
(...skipping 23 matching lines...) Expand all Loading... |
87 void CastScreen::AddObserver(display::DisplayObserver* observer) {} | 87 void CastScreen::AddObserver(display::DisplayObserver* observer) {} |
88 | 88 |
89 void CastScreen::RemoveObserver(display::DisplayObserver* observer) {} | 89 void CastScreen::RemoveObserver(display::DisplayObserver* observer) {} |
90 | 90 |
91 CastScreen::CastScreen() : display_(kDisplayId) { | 91 CastScreen::CastScreen() : display_(kDisplayId) { |
92 display_.SetScaleAndBounds(1.0f, | 92 display_.SetScaleAndBounds(1.0f, |
93 gfx::Rect(kInitDisplayWidth, kInitDisplayHeight)); | 93 gfx::Rect(kInitDisplayWidth, kInitDisplayHeight)); |
94 } | 94 } |
95 | 95 |
96 } // namespace chromecast | 96 } // namespace chromecast |
OLD | NEW |