| 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_SERVICE_CAST_SERVICE_SIMPLE_H_ | 5 #ifndef CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ |
| 6 #define CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ | 6 #define CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_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 "chromecast/service/cast_service.h" | 11 #include "chromecast/service/cast_service.h" |
| 11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 class WebContents; | 15 class WebContents; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace chromecast { | 18 namespace chromecast { |
| 18 namespace shell { | 19 namespace shell { |
| 19 class CastContentWindow; | 20 class CastContentWindow; |
| 20 | 21 |
| 21 class CastServiceSimple : public CastService { | 22 class CastServiceSimple : public CastService { |
| 22 public: | 23 public: |
| 23 CastServiceSimple(content::BrowserContext* browser_context, | 24 CastServiceSimple(content::BrowserContext* browser_context, |
| 24 PrefService* pref_service); | 25 PrefService* pref_service); |
| 25 ~CastServiceSimple() override; | 26 ~CastServiceSimple() override; |
| 26 | 27 |
| 27 protected: | 28 protected: |
| 28 // CastService implementation: | 29 // CastService implementation: |
| 29 void InitializeInternal() override; | 30 void InitializeInternal() override; |
| 30 void FinalizeInternal() override; | 31 void FinalizeInternal() override; |
| 31 void StartInternal() override; | 32 void StartInternal() override; |
| 32 void StopInternal() override; | 33 void StopInternal() override; |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 scoped_ptr<CastContentWindow> window_; | 36 std::unique_ptr<CastContentWindow> window_; |
| 36 scoped_ptr<content::WebContents> web_contents_; | 37 std::unique_ptr<content::WebContents> web_contents_; |
| 37 GURL startup_url_; | 38 GURL startup_url_; |
| 38 | 39 |
| 39 DISALLOW_COPY_AND_ASSIGN(CastServiceSimple); | 40 DISALLOW_COPY_AND_ASSIGN(CastServiceSimple); |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 } // namespace shell | 43 } // namespace shell |
| 43 } // namespace chromecast | 44 } // namespace chromecast |
| 44 | 45 |
| 45 #endif // CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ | 46 #endif // CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ |
| OLD | NEW |