Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: chromecast/shell/browser/cast_browser_main_parts.h

Issue 223143003: Initial checkin of chromecast content embedder (cast_shell) and related build scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Additional presubmit clean-up. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
7
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"
12
13 namespace content {
14 struct MainFunctionParams;
15 }
16
17 namespace chromecast {
18
19 class CastService;
20
21 namespace shell {
22
23 class CastBrowserContext;
24 class URLRequestContextFactory;
25
26 class CastBrowserMainParts : public content::BrowserMainParts {
27 public:
28 CastBrowserMainParts(
29 const content::MainFunctionParams& parameters,
30 URLRequestContextFactory* url_request_context_factory);
31 virtual ~CastBrowserMainParts();
32
33 // content::BrowserMainParts implementation:
34 virtual void PreMainMessageLoopStart() OVERRIDE;
35 virtual void PostMainMessageLoopStart() OVERRIDE;
36 virtual int PreCreateThreads() OVERRIDE;
37 virtual void PreMainMessageLoopRun() OVERRIDE;
38 virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
39 virtual void PostMainMessageLoopRun() OVERRIDE;
40
41 CastBrowserContext* browser_context() {
42 return browser_context_.get();
43 }
44
45 private:
46 static CastBrowserMainParts* GetInstance();
47
48 static CastBrowserMainParts* instance_;
49 scoped_ptr<CastBrowserContext> browser_context_;
50 scoped_ptr<CastService> cast_service_;
51 URLRequestContextFactory* const url_request_context_factory_;
52
53
54 DISALLOW_COPY_AND_ASSIGN(CastBrowserMainParts);
55 };
56
57 } // namespace shell
58 } // namespace chromecast
59
60 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_MAIN_PARTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698