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 25 matching lines...) Expand all Loading... |
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::NativeView view) const override { |
43 return GetPrimaryDisplay(); | 43 return GetPrimaryDisplay(); |
44 } | 44 } |
45 | 45 |
| 46 Display GetDisplayNearestWindowAndroid( |
| 47 gfx::NativeWindow window) const override { |
| 48 return GetPrimaryDisplay(); |
| 49 } |
| 50 |
46 Display GetDisplayNearestPoint(const gfx::Point& point) const override { | 51 Display GetDisplayNearestPoint(const gfx::Point& point) const override { |
47 return GetPrimaryDisplay(); | 52 return GetPrimaryDisplay(); |
48 } | 53 } |
49 | 54 |
50 Display GetDisplayMatching(const gfx::Rect& match_rect) const override { | 55 Display GetDisplayMatching(const gfx::Rect& match_rect) const override { |
51 return GetPrimaryDisplay(); | 56 return GetPrimaryDisplay(); |
52 } | 57 } |
53 | 58 |
54 Display GetPrimaryDisplay() const override { return displays_[0]; } | 59 Display GetPrimaryDisplay() const override { return displays_[0]; } |
55 | 60 |
56 void AddObserver(DisplayObserver* observer) override {} | 61 void AddObserver(DisplayObserver* observer) override {} |
57 void RemoveObserver(DisplayObserver* observer) override {} | 62 void RemoveObserver(DisplayObserver* observer) override {} |
58 | 63 |
59 private: | 64 private: |
60 std::vector<Display> displays_; | 65 std::vector<Display> displays_; |
61 }; | 66 }; |
62 | 67 |
63 display::Screen* CreateDummyScreenAndroid() { | 68 display::Screen* CreateDummyScreenAndroid() { |
64 return new DummyScreenAndroid; | 69 return new DummyScreenAndroid; |
65 } | 70 } |
66 | 71 |
67 } // namespace ui | 72 } // namespace ui |
OLD | NEW |