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

Side by Side Diff: chromecast/shell/browser/cast_browser_context.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_CONTEXT_H_
6 #define CHROMECAST_SHELL_BROWSER_CAST_BROWSER_CONTEXT_H_
7
8 #include "base/files/file_path.h"
9 #include "base/macros.h"
10 #include "content/public/browser/browser_context.h"
11 #include "content/public/browser/content_browser_client.h"
12
13 namespace chromecast {
14 namespace shell {
15
16 class URLRequestContextFactory;
17
18 // Chromecast does not currently support multiple profiles. So there is a
19 // single BrowserContext for all chromecast renderers.
20 // There is no support for PartitionStorage.
21 class CastBrowserContext : public content::BrowserContext {
22 public:
23 explicit CastBrowserContext(
24 URLRequestContextFactory* url_request_context_factory);
25 virtual ~CastBrowserContext();
26
27 // BrowserContext implementation:
28 virtual base::FilePath GetPath() const OVERRIDE;
29 virtual bool IsOffTheRecord() const OVERRIDE;
30 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
31 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
32 int renderer_child_id) OVERRIDE;
33 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
34 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
35 int renderer_child_id) OVERRIDE;
36 virtual net::URLRequestContextGetter*
37 GetMediaRequestContextForStoragePartition(
38 const base::FilePath& partition_path,
39 bool in_memory) OVERRIDE;
40 virtual content::ResourceContext* GetResourceContext() OVERRIDE;
41 virtual content::DownloadManagerDelegate*
42 GetDownloadManagerDelegate() OVERRIDE;
43 virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
44 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
45 virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE;
46
47 private:
48 class CastResourceContext;
49
50 // Performs initialization of the CastBrowserContext while IO is still
51 // allowed on the current thread.
52 void InitWhileIOAllowed();
53
54 URLRequestContextFactory* const url_request_context_factory_;
55 base::FilePath path_;
56 scoped_ptr<CastResourceContext> resource_context_;
57
58 DISALLOW_COPY_AND_ASSIGN(CastBrowserContext);
59 };
60
61 } // namespace shell
62 } // namespace chromecast
63
64 #endif // CHROMECAST_SHELL_BROWSER_CAST_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698