Drive: Add BatchableRequest subclass.
[chromium-blink-merge.git] / chromecast / browser / cast_content_window.h
blob1360a5e0ca458cf8306b35191e6d49c32f91a24d
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;
14 namespace test {
15 class TestFocusClient;
16 } // namespace test
17 } // namespace aura
19 namespace content {
20 class BrowserContext;
21 class WebContents;
24 namespace gfx {
25 class Size;
28 namespace chromecast {
30 class CastContentWindow : public content::WebContentsObserver {
31 public:
32 CastContentWindow();
34 // Removes the window from the screen.
35 ~CastContentWindow() override;
37 // Create a window with the given size for |web_contents|.
38 void CreateWindowTree(const gfx::Size& initial_size,
39 content::WebContents* web_contents);
41 scoped_ptr<content::WebContents> CreateWebContents(
42 const gfx::Size& initial_size,
43 content::BrowserContext* browser_context);
45 // content::WebContentsObserver implementation:
46 void DidFirstVisuallyNonEmptyPaint() override;
47 void MediaPaused() override;
48 void MediaStartedPlaying() override;
50 private:
51 #if defined(USE_AURA)
52 scoped_ptr<aura::WindowTreeHost> window_tree_host_;
53 scoped_ptr<aura::test::TestFocusClient> focus_client_;
54 #endif
56 DISALLOW_COPY_AND_ASSIGN(CastContentWindow);
59 } // namespace chromecast
61 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_