OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gfx/display.h" | 8 #include "ui/gfx/display.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
11 | 11 |
12 // static | 12 class ScreenAndroid : public Screen { |
13 bool Screen::IsDIPEnabled() { | 13 public: |
14 return false; | 14 ScreenAndroid() {} |
15 } | |
16 | 15 |
17 // static | 16 bool IsDIPEnabled() OVERRIDE { |
18 gfx::Display Screen::GetPrimaryDisplay() { | 17 return false; |
19 NOTIMPLEMENTED() << "crbug.com/117839 tracks implementation"; | 18 } |
20 return gfx::Display(0, gfx::Rect(0, 0, 1, 1)); | |
21 } | |
22 | 19 |
23 // static | 20 gfx::Point GetCursorScreenPoint() OVERRIDE { |
24 gfx::Display Screen::GetDisplayNearestWindow(gfx::NativeView view) { | 21 return gfx::Point(); |
25 return GetPrimaryDisplay(); | 22 } |
26 } | |
27 | 23 |
28 // static | 24 gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE { |
29 gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) { | 25 NOTIMPLEMENTED(); |
30 return GetPrimaryDisplay(); | 26 return NULL; |
31 } | 27 } |
32 | 28 |
33 int Screen::GetNumDisplays() { | 29 gfx::Display GetPrimaryDisplay() const OVERRIDE { |
34 return 1; | 30 NOTIMPLEMENTED() << "crbug.com/117839 tracks implementation"; |
| 31 return gfx::Display(0, gfx::Rect(0, 0, 1, 1)); |
| 32 } |
| 33 |
| 34 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const OVERRIDE { |
| 35 return GetPrimaryDisplay(); |
| 36 } |
| 37 |
| 38 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const OVERRIDE { |
| 39 return GetPrimaryDisplay(); |
| 40 } |
| 41 |
| 42 int GetNumDisplays() OVERRIDE { |
| 43 return 1; |
| 44 } |
| 45 |
| 46 virtual gfx::Display GetDisplayMatching( |
| 47 const gfx::Rect& match_rect) const OVERRIDE { |
| 48 return GetPrimaryDisplay(); |
| 49 } |
| 50 |
| 51 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(ScreenAndroid); |
| 53 }; |
| 54 |
| 55 Screen* CreateNativeScreen() { |
| 56 return new ScreenAndroid; |
35 } | 57 } |
36 | 58 |
37 } // namespace gfx | 59 } // namespace gfx |
OLD | NEW |