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

Side by Side Diff: chromecast/browser/cast_content_window_linux.h

Issue 2643553002: [Chromecast] Reuse the Aura window manager across receiver apps. (Closed)
Patch Set: Created 3 years, 11 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 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_ 5 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_
6 #define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_ 6 #define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chromecast/browser/cast_content_window.h" 11 #include "chromecast/browser/cast_content_window.h"
12 #include "chromecast/graphics/cast_vsync_settings.h"
13 #include "content/public/browser/web_contents_observer.h" 12 #include "content/public/browser/web_contents_observer.h"
14 #include "ui/events/keycodes/keyboard_codes.h" 13 #include "ui/events/keycodes/keyboard_codes.h"
15 14
16 namespace aura {
17 class WindowTreeHost;
18 }
19
20 namespace content { 15 namespace content {
21 class BrowserContext; 16 class BrowserContext;
22 class WebContents; 17 class WebContents;
23 } 18 }
24 19
25 namespace chromecast { 20 namespace chromecast {
26 namespace shell { 21 namespace shell {
27 22
28 class CastContentWindowLinux : public CastContentWindow, 23 class CastContentWindowLinux : public CastContentWindow,
29 public content::WebContentsObserver, 24 public content::WebContentsObserver {
30 public CastVSyncSettings::Observer {
31 public: 25 public:
32 // Removes the window from the screen. 26 // Removes the window from the screen.
33 ~CastContentWindowLinux() override; 27 ~CastContentWindowLinux() override;
34 28
35 // CastContentWindow implementation. 29 // CastContentWindow implementation.
36 void SetTransparent() override; 30 void SetTransparent() override;
37 void ShowWebContents(content::WebContents* web_contents) override; 31 void ShowWebContents(content::WebContents* web_contents,
32 CastWindowManager* window_manager) override;
38 std::unique_ptr<content::WebContents> CreateWebContents( 33 std::unique_ptr<content::WebContents> CreateWebContents(
39 content::BrowserContext* browser_context) override; 34 content::BrowserContext* browser_context) override;
40 35
41 // content::WebContentsObserver implementation: 36 // content::WebContentsObserver implementation:
42 void DidFirstVisuallyNonEmptyPaint() override; 37 void DidFirstVisuallyNonEmptyPaint() override;
43 void MediaStartedPlaying(const MediaPlayerInfo& media_info, 38 void MediaStartedPlaying(const MediaPlayerInfo& media_info,
44 const MediaPlayerId& id) override; 39 const MediaPlayerId& id) override;
45 void MediaStoppedPlaying(const MediaPlayerInfo& media_info, 40 void MediaStoppedPlaying(const MediaPlayerInfo& media_info,
46 const MediaPlayerId& id) override; 41 const MediaPlayerId& id) override;
47 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 42 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
48 43
49 // CastVSyncSettings::Observer implementation:
50 void OnVSyncIntervalChanged(base::TimeDelta interval) override;
51
52 private: 44 private:
53 friend class CastContentWindow; 45 friend class CastContentWindow;
54 46
55 // This class should only be instantiated by CastContentWindow::Create. 47 // This class should only be instantiated by CastContentWindow::Create.
56 CastContentWindowLinux(); 48 CastContentWindowLinux();
57 49
58 #if defined(USE_AURA)
59 std::unique_ptr<aura::WindowTreeHost> window_tree_host_;
60 #endif
61 bool transparent_; 50 bool transparent_;
62 51
63 DISALLOW_COPY_AND_ASSIGN(CastContentWindowLinux); 52 DISALLOW_COPY_AND_ASSIGN(CastContentWindowLinux);
64 }; 53 };
65 54
66 } // namespace shell 55 } // namespace shell
67 } // namespace chromecast 56 } // namespace chromecast
68 57
69 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_ 58 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698