Disable flaky testHTTPResponseTimelineRecorder on Mac
[chromium-blink-merge.git] / chromecast / browser / cast_browser_process.h
blob456e7af382b51a410997f151c2de49baa826aea0
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_BROWSER_CAST_BROWSER_PROCESS_H_
6 #define CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
11 class PrefService;
13 namespace breakpad {
14 class CrashDumpManager;
15 } // namespace breakpad
17 namespace chromecast {
18 class CastService;
19 class WebCryptoServer;
21 namespace metrics {
22 class CastMetricsHelper;
23 class CastMetricsServiceClient;
24 } // namespace metrics
26 namespace shell {
27 class CastBrowserContext;
28 class RemoteDebuggingServer;
30 class CastBrowserProcess {
31 public:
32 // Gets the global instance of CastBrowserProcess. Does not create lazily and
33 // assumes the instance already exists.
34 static CastBrowserProcess* GetInstance();
36 CastBrowserProcess();
37 virtual ~CastBrowserProcess();
39 void SetBrowserContext(scoped_ptr<CastBrowserContext> browser_context);
40 void SetCastService(scoped_ptr<CastService> cast_service);
41 void SetMetricsHelper(scoped_ptr<metrics::CastMetricsHelper> metrics_helper);
42 void SetMetricsServiceClient(
43 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client);
44 void SetPrefService(scoped_ptr<PrefService> pref_service);
45 void SetRemoteDebuggingServer(
46 scoped_ptr<RemoteDebuggingServer> remote_debugging_server);
47 #if defined(OS_ANDROID)
48 void SetCrashDumpManager(
49 scoped_ptr<breakpad::CrashDumpManager> crash_dump_manager);
50 #endif // defined(OS_ANDROID)
52 CastBrowserContext* browser_context() const { return browser_context_.get(); }
53 CastService* cast_service() const { return cast_service_.get(); }
54 metrics::CastMetricsServiceClient* metrics_service_client() const {
55 return metrics_service_client_.get();
57 PrefService* pref_service() const { return pref_service_.get(); }
59 private:
60 // Note: The following order should match the order they are set in
61 // CastBrowserMainParts.
62 scoped_ptr<metrics::CastMetricsHelper> metrics_helper_;
63 scoped_ptr<PrefService> pref_service_;
64 scoped_ptr<CastBrowserContext> browser_context_;
65 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_;
66 #if defined(OS_ANDROID)
67 scoped_ptr<breakpad::CrashDumpManager> crash_dump_manager_;
68 #endif // defined(OS_ANDROID)
69 scoped_ptr<RemoteDebuggingServer> remote_debugging_server_;
71 // Note: CastService must be destroyed before others.
72 scoped_ptr<CastService> cast_service_;
74 DISALLOW_COPY_AND_ASSIGN(CastBrowserProcess);
77 } // namespace shell
78 } // namespace chromecast
80 #endif // CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_