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

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: addressing damienv's comments 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
« no previous file with comments | « chromecast/service/cast_platform_init_stub.cc ('k') | chromecast/service/cast_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/service/cast_service.h
diff --git a/chromecast/service/cast_service.h b/chromecast/service/cast_service.h
index de408b4cc6cbd09dbb977f12af777c1193a4cefc..606f8f7c87b6d89850fe6efccf72adfa223afeea 100644
--- a/chromecast/service/cast_service.h
+++ b/chromecast/service/cast_service.h
@@ -8,39 +8,38 @@
#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);
+ static CastService* Create(content::BrowserContext* browser_context);
+
virtual ~CastService();
// 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;
- void Initialize();
+ // Implementation-specific start/stop behavior.
+ virtual void StartInternal() = 0;
+ virtual void StopInternal() = 0;
+ 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_;
« no previous file with comments | « chromecast/service/cast_platform_init_stub.cc ('k') | chromecast/service/cast_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698