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

Side by Side Diff: chromecast/browser/service/cast_service_simple.h

Issue 2570623003: [Chromecast] Turn CastContentWindow into an abstract interface. (Closed)
Patch Set: Fix browser test Created 3 years, 11 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_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> 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/service/cast_service.h" 12 #include "chromecast/service/cast_service.h"
12 #include "url/gurl.h" 13 #include "url/gurl.h"
13 14
14 namespace content { 15 namespace content {
15 class WebContents; 16 class WebContents;
16 } 17 }
17 18
18 namespace chromecast { 19 namespace chromecast {
19 namespace shell { 20 namespace shell {
20 class CastContentWindow;
21 21
22 class CastServiceSimple : public CastService { 22 class CastServiceSimple : public CastService,
23 public CastContentWindow::Delegate {
23 public: 24 public:
24 CastServiceSimple(content::BrowserContext* browser_context, 25 CastServiceSimple(content::BrowserContext* browser_context,
25 PrefService* pref_service); 26 PrefService* pref_service);
26 ~CastServiceSimple() override; 27 ~CastServiceSimple() override;
27 28
28 protected: 29 protected:
29 // CastService implementation: 30 // CastService implementation:
30 void InitializeInternal() override; 31 void InitializeInternal() override;
31 void FinalizeInternal() override; 32 void FinalizeInternal() override;
32 void StartInternal() override; 33 void StartInternal() override;
33 void StopInternal() override; 34 void StopInternal() override;
34 35
36 // CastContentWindow::Delegate implementation:
37 void OnWindowDestroyed() override;
38 void OnKeyEvent(const ui::KeyEvent& key_event) override;
39
35 private: 40 private:
36 std::unique_ptr<CastContentWindow> window_; 41 std::unique_ptr<CastContentWindow> window_;
37 std::unique_ptr<content::WebContents> web_contents_; 42 std::unique_ptr<content::WebContents> web_contents_;
38 GURL startup_url_; 43 GURL startup_url_;
39 44
40 DISALLOW_COPY_AND_ASSIGN(CastServiceSimple); 45 DISALLOW_COPY_AND_ASSIGN(CastServiceSimple);
41 }; 46 };
42 47
43 } // namespace shell 48 } // namespace shell
44 } // namespace chromecast 49 } // namespace chromecast
45 50
46 #endif // CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_ 51 #endif // CHROMECAST_BROWSER_SERVICE_CAST_SERVICE_SIMPLE_H_
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_window_linux.cc ('k') | chromecast/browser/service/cast_service_simple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698