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

Side by Side Diff: chromecast/shell/browser/cast_content_browser_client.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: Remove ScreenCast code and stale comments. 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_CONTENT_BROWSER_CLIENT_H_
6 #define CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
7
8 #include "content/public/browser/content_browser_client.h"
9
10 namespace content {
11 class AccessTokenStore;
12 enum CertificateRequestResultType;
13 class ResourceContext;
14 }
jam 2014/07/01 21:56:10 all these forward declares aren't needed since the
lcwu1 2014/07/02 23:30:33 Done.
15
16 enum WindowContainerType;
jam 2014/07/01 21:56:09 remove this (can't forward declare an enum anyways
lcwu1 2014/07/02 23:30:33 Done.
17
18 namespace chromecast {
19 namespace shell {
20
21 class CastBrowserMainParts;
22 class URLRequestContextFactory;
23
24 class CastContentBrowserClient: public content::ContentBrowserClient {
25 public:
26 CastContentBrowserClient();
27 virtual ~CastContentBrowserClient();
28
29 // Overridden from content::ContentBrowserClient
30 virtual content::BrowserMainParts* CreateBrowserMainParts(
31 const content::MainFunctionParams& parameters) OVERRIDE;
32
jam 2014/07/01 21:56:10 nit: here and below, no blank lines between overri
lcwu1 2014/07/02 23:30:33 Done.
33 virtual void RenderProcessWillLaunch(
34 content::RenderProcessHost* host) OVERRIDE;
35
36 virtual net::URLRequestContextGetter* CreateRequestContext(
37 content::BrowserContext* browser_context,
38 content::ProtocolHandlerMap* protocol_handlers,
39 content::URLRequestInterceptorScopedVector protocol_interceptors)
40 OVERRIDE;
41
42 virtual bool IsHandledURL(const GURL& url) OVERRIDE;
43
44 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
45 int child_process_id) OVERRIDE;
46
47 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
48
49 virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
50 const GURL& url,
51 WebPreferences* prefs) OVERRIDE;
52
53 virtual std::string GetApplicationLocale() OVERRIDE;
54
55 virtual void AllowCertificateError(
56 int render_process_id,
57 int render_view_id,
58 int cert_error,
59 const net::SSLInfo& ssl_info,
60 const GURL& request_url,
61 ResourceType::Type resource_type,
62 bool overridable,
63 bool strict_enforcement,
64 const base::Callback<void(bool)>& callback,
65 content::CertificateRequestResultType* result) OVERRIDE;
66
67 virtual bool CanCreateWindow(
68 const GURL& opener_url,
69 const GURL& opener_top_level_frame_url,
70 const GURL& source_origin,
71 WindowContainerType container_type,
72 const GURL& target_url,
73 const content::Referrer& referrer,
74 WindowOpenDisposition disposition,
75 const blink::WebWindowFeatures& features,
76 bool user_gesture,
77 bool opener_suppressed,
78 content::ResourceContext* context,
79 int render_process_id,
80 int opener_id,
81 bool* no_javascript_access) OVERRIDE;
82
83 virtual void GetAdditionalMappedFilesForChildProcess(
84 const base::CommandLine& command_line,
85 int child_process_id,
86 std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
87
88 private:
89 scoped_ptr<CastBrowserMainParts> shell_browser_main_parts_;
90
91 scoped_ptr<URLRequestContextFactory> url_request_context_factory_;
92
93 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient);
94 };
95
96 } // namespace shell
97 } // namespace chromecast
98
99 #endif // CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698