Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: chromecast/browser/cast_content_window.h

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/web_contents_observer.h" 11 #include "content/public/browser/web_contents_observer.h"
11 12
12 namespace aura { 13 namespace aura {
13 class WindowTreeHost; 14 class WindowTreeHost;
14 } 15 }
15 16
16 namespace content { 17 namespace content {
17 class BrowserContext; 18 class BrowserContext;
18 class WebContents; 19 class WebContents;
19 } 20 }
(...skipping 13 matching lines...) Expand all
33 ~CastContentWindow() override; 34 ~CastContentWindow() override;
34 35
35 // Sets the window's background to be transparent (call before 36 // Sets the window's background to be transparent (call before
36 // CreateWindowTree). 37 // CreateWindowTree).
37 void SetTransparent() { transparent_ = true; } 38 void SetTransparent() { transparent_ = true; }
38 39
39 // Create a window with the given size for |web_contents|. 40 // Create a window with the given size for |web_contents|.
40 void CreateWindowTree(const gfx::Size& initial_size, 41 void CreateWindowTree(const gfx::Size& initial_size,
41 content::WebContents* web_contents); 42 content::WebContents* web_contents);
42 43
43 scoped_ptr<content::WebContents> CreateWebContents( 44 std::unique_ptr<content::WebContents> CreateWebContents(
44 const gfx::Size& initial_size, 45 const gfx::Size& initial_size,
45 content::BrowserContext* browser_context); 46 content::BrowserContext* browser_context);
46 47
47 // content::WebContentsObserver implementation: 48 // content::WebContentsObserver implementation:
48 void DidFirstVisuallyNonEmptyPaint() override; 49 void DidFirstVisuallyNonEmptyPaint() override;
49 void MediaStoppedPlaying(const MediaPlayerId& id) override; 50 void MediaStoppedPlaying(const MediaPlayerId& id) override;
50 void MediaStartedPlaying(const MediaPlayerId& id) override; 51 void MediaStartedPlaying(const MediaPlayerId& id) override;
51 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 52 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
52 53
53 private: 54 private:
54 #if defined(USE_AURA) 55 #if defined(USE_AURA)
55 scoped_ptr<aura::WindowTreeHost> window_tree_host_; 56 std::unique_ptr<aura::WindowTreeHost> window_tree_host_;
56 #endif 57 #endif
57 bool transparent_; 58 bool transparent_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(CastContentWindow); 60 DISALLOW_COPY_AND_ASSIGN(CastContentWindow);
60 }; 61 };
61 62
62 } // namespace shell 63 } // namespace shell
63 } // namespace chromecast 64 } // namespace chromecast
64 65
65 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_ 66 #endif // CHROMECAST_BROWSER_CAST_CONTENT_WINDOW_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client_simple.cc ('k') | chromecast/browser/cast_content_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698