OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ |
6 #define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ | 6 #define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 CastContentWindow(); | 31 CastContentWindow(); |
32 | 32 |
33 // Removes the window from the screen. | 33 // Removes the window from the screen. |
34 ~CastContentWindow() override; | 34 ~CastContentWindow() override; |
35 | 35 |
36 // Sets the window's background to be transparent (call before | 36 // Sets the window's background to be transparent (call before |
37 // CreateWindowTree). | 37 // CreateWindowTree). |
38 void SetTransparent() { transparent_ = true; } | 38 void SetTransparent() { transparent_ = true; } |
39 | 39 |
40 // Create a window with the given size for |web_contents|. | 40 // Create a full-screen window for |web_contents|. |
41 void CreateWindowTree(const gfx::Size& initial_size, | 41 void CreateWindowTree(content::WebContents* web_contents); |
42 content::WebContents* web_contents); | |
43 | 42 |
44 std::unique_ptr<content::WebContents> CreateWebContents( | 43 std::unique_ptr<content::WebContents> CreateWebContents( |
45 const gfx::Size& initial_size, | |
46 content::BrowserContext* browser_context); | 44 content::BrowserContext* browser_context); |
47 | 45 |
48 // content::WebContentsObserver implementation: | 46 // content::WebContentsObserver implementation: |
49 void DidFirstVisuallyNonEmptyPaint() override; | 47 void DidFirstVisuallyNonEmptyPaint() override; |
50 void MediaStoppedPlaying(const MediaPlayerId& id) override; | 48 void MediaStoppedPlaying(const MediaPlayerId& id) override; |
51 void MediaStartedPlaying(const MediaPlayerId& id) override; | 49 void MediaStartedPlaying(const MediaPlayerId& id) override; |
52 void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 50 void RenderViewCreated(content::RenderViewHost* render_view_host) override; |
53 | 51 |
54 private: | 52 private: |
55 #if defined(USE_AURA) | 53 #if defined(USE_AURA) |
56 std::unique_ptr<aura::WindowTreeHost> window_tree_host_; | 54 std::unique_ptr<aura::WindowTreeHost> window_tree_host_; |
57 #endif | 55 #endif |
58 bool transparent_; | 56 bool transparent_; |
59 | 57 |
60 DISALLOW_COPY_AND_ASSIGN(CastContentWindow); | 58 DISALLOW_COPY_AND_ASSIGN(CastContentWindow); |
61 }; | 59 }; |
62 | 60 |
63 } // namespace shell | 61 } // namespace shell |
64 } // namespace chromecast | 62 } // namespace chromecast |
65 | 63 |
66 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ | 64 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ |
OLD | NEW |