Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: ui/android/dummy_screen_android.cc

Issue 2688113002: Make ViewRoot the top of the ViewAndroid tree (Closed)
Patch Set: - Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698