| OLD | NEW |
| 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 "content/public/browser/web_contents_observer.h" | |
| 13 #include "ui/events/keycodes/keyboard_codes.h" | 12 #include "ui/events/keycodes/keyboard_codes.h" |
| 14 | 13 |
| 15 namespace content { | 14 namespace content { |
| 16 class BrowserContext; | |
| 17 class WebContents; | 15 class WebContents; |
| 18 } | 16 } |
| 19 | 17 |
| 20 namespace chromecast { | 18 namespace chromecast { |
| 21 namespace shell { | 19 namespace shell { |
| 22 | 20 |
| 23 class CastContentWindowLinux : public CastContentWindow, | 21 class CastContentWindowLinux : public CastContentWindow { |
| 24 public content::WebContentsObserver { | |
| 25 public: | 22 public: |
| 26 // Removes the window from the screen. | 23 // Removes the window from the screen. |
| 27 ~CastContentWindowLinux() override; | 24 ~CastContentWindowLinux() override; |
| 28 | 25 |
| 29 // CastContentWindow implementation. | 26 // CastContentWindow implementation. |
| 30 void SetTransparent() override; | 27 void SetTransparent() override; |
| 31 void ShowWebContents(content::WebContents* web_contents, | 28 void ShowWebContents(content::WebContents* web_contents, |
| 32 CastWindowManager* window_manager) override; | 29 CastWindowManager* window_manager) override; |
| 33 std::unique_ptr<content::WebContents> CreateWebContents( | |
| 34 content::BrowserContext* browser_context, | |
| 35 scoped_refptr<content::SiteInstance> site_instance) override; | |
| 36 | |
| 37 // content::WebContentsObserver implementation: | |
| 38 void DidStartNavigation( | |
| 39 content::NavigationHandle* navigation_handle) override; | |
| 40 void DidFirstVisuallyNonEmptyPaint() override; | |
| 41 void MediaStartedPlaying(const MediaPlayerInfo& media_info, | |
| 42 const MediaPlayerId& id) override; | |
| 43 void MediaStoppedPlaying(const MediaPlayerInfo& media_info, | |
| 44 const MediaPlayerId& id) override; | |
| 45 void RenderViewCreated(content::RenderViewHost* render_view_host) override; | |
| 46 | 30 |
| 47 private: | 31 private: |
| 48 friend class CastContentWindow; | 32 friend class CastContentWindow; |
| 49 | 33 |
| 50 // This class should only be instantiated by CastContentWindow::Create. | 34 // This class should only be instantiated by CastContentWindow::Create. |
| 51 CastContentWindowLinux(); | 35 CastContentWindowLinux(); |
| 52 | 36 |
| 53 bool transparent_; | 37 bool transparent_; |
| 54 | 38 |
| 55 DISALLOW_COPY_AND_ASSIGN(CastContentWindowLinux); | 39 DISALLOW_COPY_AND_ASSIGN(CastContentWindowLinux); |
| 56 }; | 40 }; |
| 57 | 41 |
| 58 } // namespace shell | 42 } // namespace shell |
| 59 } // namespace chromecast | 43 } // namespace chromecast |
| 60 | 44 |
| 61 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_ | 45 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_LINUX_H_ |
| OLD | NEW |