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

Side by Side Diff: chromecast/graphics/cast_screen.h

Issue 1928143002: Rename gfx::Display/Screen to display::Display/Screen in chromecast/blimp/media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update blimp's gn for recent gn change 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 | « chromecast/graphics/BUILD.gn ('k') | chromecast/graphics/cast_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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROMECAST_GRAPHICS_CAST_SCREEN_H_ 5 #ifndef CHROMECAST_GRAPHICS_CAST_SCREEN_H_
6 #define CHROMECAST_GRAPHICS_CAST_SCREEN_H_ 6 #define CHROMECAST_GRAPHICS_CAST_SCREEN_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chromecast/public/graphics_types.h" 10 #include "chromecast/public/graphics_types.h"
11 #include "ui/gfx/display.h" 11 #include "ui/display/display.h"
12 #include "ui/gfx/screen.h" 12 #include "ui/display/screen.h"
13 13
14 namespace chromecast { 14 namespace chromecast {
15 namespace shell { 15 namespace shell {
16 class CastBrowserMainParts; 16 class CastBrowserMainParts;
17 } // namespace shell 17 } // namespace shell
18 18
19 // CastScreen is Chromecast's own minimal implementation of gfx::Screen. 19 // CastScreen is Chromecast's own minimal implementation of display::Screen.
20 // Right now, it almost exactly duplicates the behavior of aura's TestScreen 20 // Right now, it almost exactly duplicates the behavior of aura's TestScreen
21 // class for necessary methods. The instantiation of CastScreen occurs in 21 // class for necessary methods. The instantiation of CastScreen occurs in
22 // CastBrowserMainParts, where its ownership is assigned to CastBrowserProcess. 22 // CastBrowserMainParts, where its ownership is assigned to CastBrowserProcess.
23 // To then subsequently access CastScreen, see CastBrowerProcess. 23 // To then subsequently access CastScreen, see CastBrowerProcess.
24 class CastScreen : public gfx::Screen { 24 class CastScreen : public display::Screen {
25 public: 25 public:
26 ~CastScreen() override; 26 ~CastScreen() override;
27 27
28 using DisplayResizeCallback = base::Callback<void(const Size&)>; 28 using DisplayResizeCallback = base::Callback<void(const Size&)>;
29 void SetDisplayResizeCallback(const DisplayResizeCallback& cb); 29 void SetDisplayResizeCallback(const DisplayResizeCallback& cb);
30 30
31 // Updates the primary display size. 31 // Updates the primary display size.
32 void UpdateDisplaySize(const gfx::Size& size); 32 void UpdateDisplaySize(const gfx::Size& size);
33 33
34 // gfx::Screen overrides: 34 // display::Screen overrides:
35 gfx::Point GetCursorScreenPoint() override; 35 gfx::Point GetCursorScreenPoint() override;
36 gfx::NativeWindow GetWindowUnderCursor() override; 36 gfx::NativeWindow GetWindowUnderCursor() override;
37 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; 37 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
38 int GetNumDisplays() const override; 38 int GetNumDisplays() const override;
39 std::vector<gfx::Display> GetAllDisplays() const override; 39 std::vector<display::Display> GetAllDisplays() const override;
40 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override; 40 display::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
41 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; 41 display::Display GetDisplayNearestPoint(
42 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; 42 const gfx::Point& point) const override;
43 gfx::Display GetPrimaryDisplay() const override; 43 display::Display GetDisplayMatching(
44 void AddObserver(gfx::DisplayObserver* observer) override; 44 const gfx::Rect& match_rect) const override;
45 void RemoveObserver(gfx::DisplayObserver* observer) override; 45 display::Display GetPrimaryDisplay() const override;
46 void AddObserver(display::DisplayObserver* observer) override;
47 void RemoveObserver(display::DisplayObserver* observer) override;
46 48
47 private: 49 private:
48 CastScreen(); 50 CastScreen();
49 51
50 gfx::Display display_; 52 display::Display display_;
51 DisplayResizeCallback display_resize_cb_; 53 DisplayResizeCallback display_resize_cb_;
52 54
53 friend class shell::CastBrowserMainParts; 55 friend class shell::CastBrowserMainParts;
54 56
55 DISALLOW_COPY_AND_ASSIGN(CastScreen); 57 DISALLOW_COPY_AND_ASSIGN(CastScreen);
56 }; 58 };
57 59
58 } // namespace chromecast 60 } // namespace chromecast
59 61
60 #endif // CHROMECAST_GRAPHICS_CAST_SCREEN_H_ 62 #endif // CHROMECAST_GRAPHICS_CAST_SCREEN_H_
OLDNEW
« no previous file with comments | « chromecast/graphics/BUILD.gn ('k') | chromecast/graphics/cast_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698