| 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_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 5 #ifndef CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| 6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "content/public/browser/browser_main_parts.h" | 11 #include "content/public/browser/browser_main_parts.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 struct MainFunctionParams; | 14 struct MainFunctionParams; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace chromecast { | 17 namespace chromecast { |
| 18 | 18 |
| 19 class CastService; | 19 class CastService; |
| 20 | 20 |
| 21 namespace metrics { |
| 22 class CastMetricsServiceClient; |
| 23 } // namespace metrics |
| 24 |
| 21 namespace shell { | 25 namespace shell { |
| 22 | 26 |
| 23 class CastBrowserContext; | 27 class CastBrowserContext; |
| 24 class RemoteDebuggingServer; | 28 class RemoteDebuggingServer; |
| 25 class URLRequestContextFactory; | 29 class URLRequestContextFactory; |
| 26 | 30 |
| 27 class CastBrowserMainParts : public content::BrowserMainParts { | 31 class CastBrowserMainParts : public content::BrowserMainParts { |
| 28 public: | 32 public: |
| 29 CastBrowserMainParts( | 33 CastBrowserMainParts( |
| 30 const content::MainFunctionParams& parameters, | 34 const content::MainFunctionParams& parameters, |
| 31 URLRequestContextFactory* url_request_context_factory); | 35 URLRequestContextFactory* url_request_context_factory); |
| 32 virtual ~CastBrowserMainParts(); | 36 virtual ~CastBrowserMainParts(); |
| 33 | 37 |
| 34 // content::BrowserMainParts implementation: | 38 // content::BrowserMainParts implementation: |
| 35 virtual void PreMainMessageLoopStart() OVERRIDE; | 39 virtual void PreMainMessageLoopStart() OVERRIDE; |
| 36 virtual void PostMainMessageLoopStart() OVERRIDE; | 40 virtual void PostMainMessageLoopStart() OVERRIDE; |
| 37 virtual int PreCreateThreads() OVERRIDE; | 41 virtual int PreCreateThreads() OVERRIDE; |
| 38 virtual void PreMainMessageLoopRun() OVERRIDE; | 42 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 39 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 43 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
| 40 virtual void PostMainMessageLoopRun() OVERRIDE; | 44 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 41 | 45 |
| 42 CastBrowserContext* browser_context() { | 46 CastBrowserContext* browser_context() { |
| 43 return browser_context_.get(); | 47 return browser_context_.get(); |
| 44 } | 48 } |
| 45 | 49 |
| 46 private: | 50 private: |
| 47 scoped_ptr<CastBrowserContext> browser_context_; | 51 scoped_ptr<CastBrowserContext> browser_context_; |
| 48 scoped_ptr<CastService> cast_service_; | 52 scoped_ptr<CastService> cast_service_; |
| 53 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_; |
| 49 scoped_ptr<RemoteDebuggingServer> dev_tools_; | 54 scoped_ptr<RemoteDebuggingServer> dev_tools_; |
| 50 URLRequestContextFactory* const url_request_context_factory_; | 55 URLRequestContextFactory* const url_request_context_factory_; |
| 51 | 56 |
| 52 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 57 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
| 53 }; | 58 }; |
| 54 | 59 |
| 55 } // namespace shell | 60 } // namespace shell |
| 56 } // namespace chromecast | 61 } // namespace chromecast |
| 57 | 62 |
| 58 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 63 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |