OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/android/dummy_screen_android.h" | 5 #include "ui/android/dummy_screen_android.h" |
6 #include "ui/display/display.h" | 6 #include "ui/display/display.h" |
7 #include "ui/display/screen.h" | 7 #include "ui/display/screen.h" |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { | 32 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { |
33 return NULL; | 33 return NULL; |
34 } | 34 } |
35 | 35 |
36 int GetNumDisplays() const override { return 1; } | 36 int GetNumDisplays() const override { return 1; } |
37 | 37 |
38 const std::vector<Display>& GetAllDisplays() const override { | 38 const std::vector<Display>& GetAllDisplays() const override { |
39 return displays_; | 39 return displays_; |
40 } | 40 } |
41 | 41 |
42 Display GetDisplayNearestWindow(gfx::NativeView view) const override { | 42 Display GetDisplayNearestWindow(gfx::NativeWindow window) const override { |
43 return GetPrimaryDisplay(); | 43 return GetPrimaryDisplay(); |
44 } | 44 } |
45 | 45 |
| 46 Display GetDisplayNearestView(gfx::NativeView view) const override { |
| 47 return GetPrimaryDisplay(); |
| 48 } |
| 49 |
46 Display GetDisplayNearestPoint(const gfx::Point& point) const override { | 50 Display GetDisplayNearestPoint(const gfx::Point& point) const override { |
47 return GetPrimaryDisplay(); | 51 return GetPrimaryDisplay(); |
48 } | 52 } |
49 | 53 |
50 Display GetDisplayMatching(const gfx::Rect& match_rect) const override { | 54 Display GetDisplayMatching(const gfx::Rect& match_rect) const override { |
51 return GetPrimaryDisplay(); | 55 return GetPrimaryDisplay(); |
52 } | 56 } |
53 | 57 |
54 Display GetPrimaryDisplay() const override { return displays_[0]; } | 58 Display GetPrimaryDisplay() const override { return displays_[0]; } |
55 | 59 |
56 void AddObserver(DisplayObserver* observer) override {} | 60 void AddObserver(DisplayObserver* observer) override {} |
57 void RemoveObserver(DisplayObserver* observer) override {} | 61 void RemoveObserver(DisplayObserver* observer) override {} |
58 | 62 |
59 private: | 63 private: |
60 std::vector<Display> displays_; | 64 std::vector<Display> displays_; |
61 }; | 65 }; |
62 | 66 |
63 display::Screen* CreateDummyScreenAndroid() { | 67 display::Screen* CreateDummyScreenAndroid() { |
64 return new DummyScreenAndroid; | 68 return new DummyScreenAndroid; |
65 } | 69 } |
66 | 70 |
67 } // namespace ui | 71 } // namespace ui |
OLD | NEW |