Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / chromecast / shell / browser / cast_browser_main_parts.h
blob6be05ada2965ff29ae3a6dcc4cad7f4b67994db1
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_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "content/public/browser/browser_main_parts.h"
13 namespace content {
14 struct MainFunctionParams;
17 namespace chromecast {
19 class CastService;
21 namespace metrics {
22 class CastMetricsServiceClient;
23 } // namespace metrics
25 namespace shell {
27 class CastBrowserContext;
28 class RemoteDebuggingServer;
29 class URLRequestContextFactory;
31 class CastBrowserMainParts : public content::BrowserMainParts {
32 public:
33 CastBrowserMainParts(
34 const content::MainFunctionParams& parameters,
35 URLRequestContextFactory* url_request_context_factory);
36 virtual ~CastBrowserMainParts();
38 // content::BrowserMainParts implementation:
39 virtual void PreMainMessageLoopStart() OVERRIDE;
40 virtual void PostMainMessageLoopStart() OVERRIDE;
41 virtual int PreCreateThreads() OVERRIDE;
42 virtual void PreMainMessageLoopRun() OVERRIDE;
43 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
44 virtual void PostMainMessageLoopRun() OVERRIDE;
46 CastBrowserContext* browser_context() {
47 return browser_context_.get();
50 private:
51 scoped_ptr<CastBrowserContext> browser_context_;
52 scoped_ptr<CastService> cast_service_;
53 scoped_ptr<metrics::CastMetricsServiceClient> metrics_service_client_;
54 scoped_ptr<RemoteDebuggingServer> dev_tools_;
55 URLRequestContextFactory* const url_request_context_factory_;
57 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts);
60 } // namespace shell
61 } // namespace chromecast
63 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_