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

Unified Diff: chromecast/service/cast_service.h

Issue 397143003: Build-level separation of default CastService implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromecast-resource-fix
Patch Set: copyright capitalization Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/service/cast_service.h
diff --git a/chromecast/service/cast_service.h b/chromecast/service/cast_service.h
index de408b4cc6cbd09dbb977f12af777c1193a4cefc..9335784860da53164e0c8e3ed03a422cce5afe26 100644
--- a/chromecast/service/cast_service.h
+++ b/chromecast/service/cast_service.h
@@ -8,39 +8,37 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-namespace aura {
-class WindowTreeHost;
-}
-
namespace base {
class ThreadChecker;
}
namespace content{
class BrowserContext;
-class WebContents;
}
namespace chromecast {
class CastService {
public:
- explicit CastService(content::BrowserContext* browser_context);
virtual ~CastService();
+ static CastService* Create(content::BrowserContext* browser_context);
damienv1 2014/07/16 23:59:40 nit: Usually static functions come first (should b
gunsch 2014/07/17 04:33:37 Done.
// Start/stop the cast service.
void Start();
void Stop();
- private:
- // Platform specific initialization if any.
- static void PlatformInitialize();
+ protected:
+ explicit CastService(content::BrowserContext* browser_context);
+ virtual void Initialize() = 0;
+
+ // Implementation-specific start/stop behavior.
+ virtual void StartInternal() = 0;
+ virtual void StopInternal() = 0;
- void Initialize();
+ content::BrowserContext* browser_context() const { return browser_context_; }
+ private:
content::BrowserContext* const browser_context_;
- scoped_ptr<aura::WindowTreeHost> window_tree_host_;
- scoped_ptr<content::WebContents> web_contents_;
bool stopped_;
const scoped_ptr<base::ThreadChecker> thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698