| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_ |
| 6 #define CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_ | 6 #define CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Gets the global instance of CastBrowserProcess. Does not create lazily and | 30 // Gets the global instance of CastBrowserProcess. Does not create lazily and |
| 31 // assumes the instance already exists. | 31 // assumes the instance already exists. |
| 32 static CastBrowserProcess* GetInstance(); | 32 static CastBrowserProcess* GetInstance(); |
| 33 | 33 |
| 34 CastBrowserProcess(); | 34 CastBrowserProcess(); |
| 35 virtual ~CastBrowserProcess(); | 35 virtual ~CastBrowserProcess(); |
| 36 | 36 |
| 37 void SetBrowserContext(CastBrowserContext* browser_context); | 37 void SetBrowserContext(CastBrowserContext* browser_context); |
| 38 void SetCastService(CastService* cast_service); | 38 void SetCastService(CastService* cast_service); |
| 39 void SetRemoteDebuggingServer(RemoteDebuggingServer* remote_debugging_server); | 39 void SetRemoteDebuggingServer(RemoteDebuggingServer* remote_debugging_server); |
| 40 void SetMetricsHelper(metrics::CastMetricsHelper* metrics_helper); |
| 40 void SetMetricsServiceClient( | 41 void SetMetricsServiceClient( |
| 41 metrics::CastMetricsServiceClient* metrics_service_client); | 42 metrics::CastMetricsServiceClient* metrics_service_client); |
| 42 #if defined(OS_ANDROID) | 43 #if defined(OS_ANDROID) |
| 43 void SetCrashDumpManager(breakpad::CrashDumpManager* crash_dump_manager); | 44 void SetCrashDumpManager(breakpad::CrashDumpManager* crash_dump_manager); |
| 44 #endif // defined(OS_ANDROID) | 45 #endif // defined(OS_ANDROID) |
| 45 | 46 |
| 46 CastBrowserContext* browser_context() const { return browser_context_.get(); } | 47 CastBrowserContext* browser_context() const { return browser_context_.get(); } |
| 47 CastService* cast_service() const { return cast_service_.get(); } | 48 CastService* cast_service() const { return cast_service_.get(); } |
| 48 metrics::CastMetricsServiceClient* metrics_service_client() const { | 49 metrics::CastMetricsServiceClient* metrics_service_client() const { |
| 49 return metrics_service_client_.get(); | 50 return metrics_service_client_.get(); |
| 50 } | 51 } |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 scoped_ptr<CastBrowserContext> browser_context_; | 54 scoped_ptr<CastBrowserContext> browser_context_; |
| 55 scoped_ptr<metrics::CastMetricsHelper> metrics_helper_; |
| 54 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_; | 56 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_; |
| 55 scoped_ptr<RemoteDebuggingServer> remote_debugging_server_; | 57 scoped_ptr<RemoteDebuggingServer> remote_debugging_server_; |
| 56 #if defined(OS_ANDROID) | 58 #if defined(OS_ANDROID) |
| 57 scoped_ptr<breakpad::CrashDumpManager> crash_dump_manager_; | 59 scoped_ptr<breakpad::CrashDumpManager> crash_dump_manager_; |
| 58 #endif // defined(OS_ANDROID) | 60 #endif // defined(OS_ANDROID) |
| 59 | 61 |
| 60 // Note: CastService must be destroyed before others. | 62 // Note: CastService must be destroyed before others. |
| 61 scoped_ptr<CastService> cast_service_; | 63 scoped_ptr<CastService> cast_service_; |
| 62 | 64 |
| 63 DISALLOW_COPY_AND_ASSIGN(CastBrowserProcess); | 65 DISALLOW_COPY_AND_ASSIGN(CastBrowserProcess); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace shell | 68 } // namespace shell |
| 67 } // namespace chromecast | 69 } // namespace chromecast |
| 68 | 70 |
| 69 #endif // CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_ | 71 #endif // CHROMECAST_BROWSER_CAST_BROWSER_PROCESS_H_ |
| OLD | NEW |