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

Unified Diff: chromecast/shell/browser/cast_browser_process.h

Issue 521753002: Chromecast: adds CastBrowserProcess to manage browser process entities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed obsolete member Created 6 years, 4 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/shell/browser/cast_browser_process.h
diff --git a/chromecast/shell/browser/cast_browser_process.h b/chromecast/shell/browser/cast_browser_process.h
new file mode 100644
index 0000000000000000000000000000000000000000..65830c2a3a09958022878c20b96369164327c20f
--- /dev/null
+++ b/chromecast/shell/browser/cast_browser_process.h
@@ -0,0 +1,63 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_SHELL_BROWSER_CAST_BROWSER_PROCESS_H_
+#define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_PROCESS_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace breakpad {
+class CrashDumpManager;
+} // namespace breakpad
+
+namespace chromecast {
+class CastService;
+class WebCryptoServer;
+
+namespace metrics {
+class CastMetricsHelper;
+class CastMetricsServiceClient;
+} // namespace metrics
+
+namespace shell {
+class CastBrowserContext;
+class RemoteDebuggingServer;
+
+class CastBrowserProcess {
+ public:
+ // Gets the global instance of CastBrowserProcess. Does not create lazily and
+ // assumes the instance already exists.
+ static CastBrowserProcess* GetInstance();
+
+ CastBrowserProcess();
+ virtual ~CastBrowserProcess();
+
+ void SetBrowserContext(CastBrowserContext* browser_context);
+ void SetCastService(CastService* cast_service);
+ void SetRemoteDebuggingServer(RemoteDebuggingServer* remote_debugging_server);
+ void SetMetricsServiceClient(
+ metrics::CastMetricsServiceClient* metrics_service_client);
+
+ CastBrowserContext* browser_context() const { return browser_context_.get(); }
+ CastService* cast_service() const { return cast_service_.get(); }
+ metrics::CastMetricsServiceClient* metrics_service_client() const {
+ return metrics_service_client_.get();
+ }
+
+ private:
+ scoped_ptr<CastBrowserContext> browser_context_;
+ scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_;
+ scoped_ptr<RemoteDebuggingServer> remote_debugging_server_;
+
+ // Note: CastService must be destroyed before others.
+ scoped_ptr<CastService> cast_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(CastBrowserProcess);
+};
+
+} // namespace shell
+} // namespace chromecast
+
+#endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_PROCESS_H_
« no previous file with comments | « chromecast/shell/browser/cast_browser_main_parts.cc ('k') | chromecast/shell/browser/cast_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698