Move VariationsRegistrySyncerWin to ChromeVariationsServiceClient
[chromium-blink-merge.git] / chromecast / browser / cast_content_window.h
bloba33382f890f0c322b12d6c5efb054e98f5921b00
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
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_
6 #define CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/web_contents_observer.h"
12 namespace aura {
13 class WindowTreeHost;
16 namespace content {
17 class BrowserContext;
18 class WebContents;
21 namespace gfx {
22 class Size;
25 namespace chromecast {
27 class CastContentWindow : public content::WebContentsObserver {
28 public:
29 CastContentWindow();
31 // Removes the window from the screen.
32 ~CastContentWindow() override;
34 // Sets the window's background to be transparent (call before
35 // CreateWindowTree).
36 void SetTransparent() { transparent_ = true; }
38 // Create a window with the given size for |web_contents|.
39 void CreateWindowTree(const gfx::Size& initial_size,
40 content::WebContents* web_contents);
42 scoped_ptr<content::WebContents> CreateWebContents(
43 const gfx::Size& initial_size,
44 content::BrowserContext* browser_context);
46 // content::WebContentsObserver implementation:
47 void DidFirstVisuallyNonEmptyPaint() override;
48 void MediaPaused() override;
49 void MediaStartedPlaying() override;
50 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
52 private:
53 #if defined(USE_AURA)
54 scoped_ptr<aura::WindowTreeHost> window_tree_host_;
55 #endif
56 bool transparent_;
58 DISALLOW_COPY_AND_ASSIGN(CastContentWindow);
61 } // namespace chromecast
63 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_