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

Side by Side Diff: ui/gfx/test/test_screen.h

Issue 1957523004: Rename gfx::test::TestScreen to display::test::TestScreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/test/test_screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include <vector>
6
7 #include "base/macros.h"
8 #include "ui/gfx/display.h"
9 #include "ui/gfx/screen.h"
10
11 namespace gfx {
12 namespace test {
13
14 // A dummy implementation of gfx::Screen that contains a single gfx::Display
15 // only. The contained gfx::Display can be accessed and modified via
16 // TestScreen::display().
17 //
18 // NOTE: Adding and removing gfx::DisplayOberver's are no-ops and observers will
19 // NOT be notified ever.
20 class TestScreen : public gfx::Screen {
21 public:
22 TestScreen();
23 ~TestScreen() override;
24
25 gfx::Display* display() { return &display_; }
26
27 // gfx::Screen:
28 gfx::Point GetCursorScreenPoint() override;
29 bool IsWindowUnderCursor(gfx::NativeWindow window) override;
30 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
31 int GetNumDisplays() const override;
32 std::vector<gfx::Display> GetAllDisplays() const override;
33 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
34 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
35 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
36 gfx::Display GetPrimaryDisplay() const override;
37 void AddObserver(gfx::DisplayObserver* observer) override;
38 void RemoveObserver(gfx::DisplayObserver* observer) override;
39
40 private:
41 // The only display.
42 gfx::Display display_;
43
44 DISALLOW_COPY_AND_ASSIGN(TestScreen);
45 };
46
47 } // namespace test
48 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/test/test_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698