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" |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual int PreCreateThreads() OVERRIDE; | 36 virtual int PreCreateThreads() OVERRIDE; |
37 virtual void PreMainMessageLoopRun() OVERRIDE; | 37 virtual void PreMainMessageLoopRun() OVERRIDE; |
38 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; | 38 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; |
39 virtual void PostMainMessageLoopRun() OVERRIDE; | 39 virtual void PostMainMessageLoopRun() OVERRIDE; |
40 | 40 |
41 CastBrowserContext* browser_context() { | 41 CastBrowserContext* browser_context() { |
42 return browser_context_.get(); | 42 return browser_context_.get(); |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 static CastBrowserMainParts* GetInstance(); | |
47 | |
48 static CastBrowserMainParts* instance_; | |
49 scoped_ptr<CastBrowserContext> browser_context_; | 46 scoped_ptr<CastBrowserContext> browser_context_; |
50 scoped_ptr<CastService> cast_service_; | 47 scoped_ptr<CastService> cast_service_; |
51 URLRequestContextFactory* const url_request_context_factory_; | 48 URLRequestContextFactory* const url_request_context_factory_; |
52 | 49 |
53 | 50 |
54 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); | 51 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts); |
55 }; | 52 }; |
56 | 53 |
57 } // namespace shell | 54 } // namespace shell |
58 } // namespace chromecast | 55 } // namespace chromecast |
59 | 56 |
60 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ | 57 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_ |
OLD | NEW |