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

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

Issue 1824723003: [chromecast] Pass media task runner to VideoPlaneController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fixed android build Created 4 years, 9 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/macros.h" 9 #include "base/macros.h"
10 #include "chromecast/public/graphics_types.h"
9 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h" 12 #include "ui/gfx/screen.h"
11 13
12 namespace chromecast { 14 namespace chromecast {
13
14 namespace shell { 15 namespace shell {
15 class CastBrowserMainParts; 16 class CastBrowserMainParts;
16 } // namespace shell 17 } // namespace shell
17 18
18 // CastScreen is Chromecast's own minimal implementation of gfx::Screen. 19 // CastScreen is Chromecast's own minimal implementation of gfx::Screen.
19 // 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
20 // class for necessary methods. The instantiation of CastScreen occurs in 21 // class for necessary methods. The instantiation of CastScreen occurs in
21 // CastBrowserMainParts, where its ownership is assigned to CastBrowserProcess. 22 // CastBrowserMainParts, where its ownership is assigned to CastBrowserProcess.
22 // To then subsequently access CastScreen, see CastBrowerProcess. 23 // To then subsequently access CastScreen, see CastBrowerProcess.
23 class CastScreen : public gfx::Screen { 24 class CastScreen : public gfx::Screen {
24 public: 25 public:
25 ~CastScreen() override; 26 ~CastScreen() override;
26 27
28 using DisplayResizeCallback = base::Callback<void(const Size&)>;
29 void SetDisplayResizeCallback(const DisplayResizeCallback& cb);
30
27 // Updates the primary display size. 31 // Updates the primary display size.
28 void UpdateDisplaySize(const gfx::Size& size); 32 void UpdateDisplaySize(const gfx::Size& size);
29 33
30 // gfx::Screen overrides: 34 // gfx::Screen overrides:
31 gfx::Point GetCursorScreenPoint() override; 35 gfx::Point GetCursorScreenPoint() override;
32 gfx::NativeWindow GetWindowUnderCursor() override; 36 gfx::NativeWindow GetWindowUnderCursor() override;
33 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override; 37 gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
34 int GetNumDisplays() const override; 38 int GetNumDisplays() const override;
35 std::vector<gfx::Display> GetAllDisplays() const override; 39 std::vector<gfx::Display> GetAllDisplays() const override;
36 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override; 40 gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override;
37 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override; 41 gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
38 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override; 42 gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
39 gfx::Display GetPrimaryDisplay() const override; 43 gfx::Display GetPrimaryDisplay() const override;
40 void AddObserver(gfx::DisplayObserver* observer) override; 44 void AddObserver(gfx::DisplayObserver* observer) override;
41 void RemoveObserver(gfx::DisplayObserver* observer) override; 45 void RemoveObserver(gfx::DisplayObserver* observer) override;
42 46
43 private: 47 private:
44 CastScreen(); 48 CastScreen();
45 49
46 gfx::Display display_; 50 gfx::Display display_;
51 DisplayResizeCallback display_resize_cb_;
47 52
48 friend class shell::CastBrowserMainParts; 53 friend class shell::CastBrowserMainParts;
49 54
50 DISALLOW_COPY_AND_ASSIGN(CastScreen); 55 DISALLOW_COPY_AND_ASSIGN(CastScreen);
51 }; 56 };
52 57
53 } // namespace chromecast 58 } // namespace chromecast
54 59
55 #endif // CHROMECAST_GRAPHICS_CAST_SCREEN_H_ 60 #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