Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / gfx / test / test_screen.cc
blob31361dd0151dfbd133b7b2ceee46172c1889cbc6
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
3 // found in the LICENSE file.
5 #include <vector>
7 #include "ui/gfx/test/test_screen.h"
9 namespace gfx {
10 namespace test {
12 TestScreen::TestScreen() {
15 TestScreen::~TestScreen() {
18 gfx::Point TestScreen::GetCursorScreenPoint() {
19 return gfx::Point();
22 gfx::NativeWindow TestScreen::GetWindowUnderCursor() {
23 return nullptr;
26 gfx::NativeWindow TestScreen::GetWindowAtScreenPoint(const gfx::Point& point) {
27 return nullptr;
30 int TestScreen::GetNumDisplays() const {
31 return 1;
34 std::vector<gfx::Display> TestScreen::GetAllDisplays() const {
35 return std::vector<gfx::Display>(1, display_);
38 gfx::Display TestScreen::GetDisplayNearestWindow(gfx::NativeView view) const {
39 return display_;
42 gfx::Display TestScreen::GetDisplayNearestPoint(const gfx::Point& point) const {
43 return display_;
46 gfx::Display TestScreen::GetDisplayMatching(const gfx::Rect& match_rect) const {
47 return display_;
50 gfx::Display TestScreen::GetPrimaryDisplay() const {
51 return display_;
54 void TestScreen::AddObserver(gfx::DisplayObserver* observer) {
57 void TestScreen::RemoveObserver(gfx::DisplayObserver* observer) {
60 } // namespace test
61 } // namespace gfx