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
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_SHELL_BROWSER_CAST_BROWSER_PROCESS_H_
6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_PROCESS_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
12 class CrashDumpManager;
13 } // namespace breakpad
15 namespace chromecast {
17 class WebCryptoServer;
20 class CastMetricsHelper;
21 class CastMetricsServiceClient;
22 } // namespace metrics
25 class CastBrowserContext;
26 class RemoteDebuggingServer;
28 class CastBrowserProcess {
30 // Gets the global instance of CastBrowserProcess. Does not create lazily and
31 // assumes the instance already exists.
32 static CastBrowserProcess* GetInstance();
35 virtual ~CastBrowserProcess();
37 void SetBrowserContext(CastBrowserContext* browser_context);
38 void SetCastService(CastService* cast_service);
39 void SetRemoteDebuggingServer(RemoteDebuggingServer* remote_debugging_server);
40 void SetMetricsServiceClient(
41 metrics::CastMetricsServiceClient* metrics_service_client);
43 CastBrowserContext* browser_context() const { return browser_context_.get(); }
44 CastService* cast_service() const { return cast_service_.get(); }
45 metrics::CastMetricsServiceClient* metrics_service_client() const {
46 return metrics_service_client_.get();
50 scoped_ptr<CastBrowserContext> browser_context_;
51 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_;
52 scoped_ptr<RemoteDebuggingServer> remote_debugging_server_;
54 // Note: CastService must be destroyed before others.
55 scoped_ptr<CastService> cast_service_;
57 DISALLOW_COPY_AND_ASSIGN(CastBrowserProcess);
61 } // namespace chromecast
63 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_PROCESS_H_