| 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 shell { | 21 namespace shell { |
| 22 | 22 |
| 23 class CastBrowserContext; | 23 class CastBrowserContext; |
| 24 class RemoteDebuggingServer; |
| 24 class URLRequestContextFactory; | 25 class URLRequestContextFactory; |
| 25 | 26 |
| 26 class CastBrowserMainParts : public content::BrowserMainParts { | 27 class CastBrowserMainParts : public content::BrowserMainParts { |
| 27 public: | 28 public: |
| 28 CastBrowserMainParts( | 29 CastBrowserMainParts( |
| 29 const content::MainFunctionParams& parameters, | 30 const content::MainFunctionParams& parameters, |
| 30 URLRequestContextFactory* url_request_context_factory); | 31 URLRequestContextFactory* url_request_context_factory); |
| 31 virtual ~CastBrowserMainParts(); | 32 virtual ~CastBrowserMainParts(); |
| 32 | 33 |
| 33 // content::BrowserMainParts implementation: | 34 // content::BrowserMainParts implementation: |
| 34 virtual void PreMainMessageLoopStart() OVERRIDE; | 35 virtual void PreMainMessageLoopStart() OVERRIDE; |
| 35 virtual void PostMainMessageLoopStart() OVERRIDE; | 36 virtual void PostMainMessageLoopStart() OVERRIDE; |
| 36 virtual int PreCreateThreads() OVERRIDE; | 37 virtual int PreCreateThreads() OVERRIDE; |
| 37 virtual void PreMainMessageLoopRun() OVERRIDE; | 38 virtual void PreMainMessageLoopRun() OVERRIDE; |
| 38 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 39 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
| 39 virtual void PostMainMessageLoopRun() OVERRIDE; | 40 virtual void PostMainMessageLoopRun() OVERRIDE; |
| 40 | 41 |
| 41 CastBrowserContext* browser_context() { | 42 CastBrowserContext* browser_context() { |
| 42 return browser_context_.get(); | 43 return browser_context_.get(); |
| 43 } | 44 } |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 scoped_ptr<CastBrowserContext> browser_context_; | 47 scoped_ptr<CastBrowserContext> browser_context_; |
| 47 scoped_ptr<CastService> cast_service_; | 48 scoped_ptr<CastService> cast_service_; |
| 49 scoped_ptr<RemoteDebuggingServer> dev_tools_; |
| 48 URLRequestContextFactory* const url_request_context_factory_; | 50 URLRequestContextFactory* const url_request_context_factory_; |
| 49 | 51 |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 52 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 } // namespace shell | 55 } // namespace shell |
| 55 } // namespace chromecast | 56 } // namespace chromecast |
| 56 | 57 |
| 57 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 58 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
| OLD | NEW |