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" |
11 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | |
15 class WebContents; | 14 class WebContents; |
16 } | 15 } |
17 | 16 |
18 namespace chromecast { | 17 namespace chromecast { |
19 namespace shell { | 18 namespace shell { |
20 | 19 |
21 // Class that represents the "window" a WebContents is displayed in cast_shell. | 20 // Class that represents the "window" a WebContents is displayed in cast_shell. |
22 // For Linux, this represents an Aura window. For Android, this is a Activity. | 21 // For Linux, this represents an Aura window. For Android, this is a Activity. |
23 // See CastContentWindowLinux and CastContentWindowAndroid. | 22 // See CastContentWindowLinux and CastContentWindowAndroid. |
24 class CastContentWindow { | 23 class CastContentWindow { |
(...skipping 14 matching lines...) Expand all Loading... |
39 | 38 |
40 virtual ~CastContentWindow() {} | 39 virtual ~CastContentWindow() {} |
41 | 40 |
42 // Sets the window's background to be transparent (call before | 41 // Sets the window's background to be transparent (call before |
43 // CreateWindowTree). | 42 // CreateWindowTree). |
44 virtual void SetTransparent() = 0; | 43 virtual void SetTransparent() = 0; |
45 | 44 |
46 // Creates a full-screen window for |web_contents| and display it. | 45 // Creates a full-screen window for |web_contents| and display it. |
47 // |web_contents| should outlive this CastContentWindow. | 46 // |web_contents| should outlive this CastContentWindow. |
48 virtual void ShowWebContents(content::WebContents* web_contents) = 0; | 47 virtual void ShowWebContents(content::WebContents* web_contents) = 0; |
49 | |
50 // Creates a WebContents. | |
51 // TODO(derekjchow): remove this function from this class, since it doesn't | |
52 // have anything to do with displaying web_contents. | |
53 virtual std::unique_ptr<content::WebContents> CreateWebContents( | |
54 content::BrowserContext* browser_context) = 0; | |
55 }; | 48 }; |
56 | 49 |
57 } // namespace shell | 50 } // namespace shell |
58 } // namespace chromecast | 51 } // namespace chromecast |
59 | 52 |
60 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ | 53 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ |
OLD | NEW |