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

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: Add an additional function in gl_surface_cast.cc Created 6 years, 8 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 (c) 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 }
15
16 enum WindowContainerType;
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
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::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
40
41 virtual bool IsHandledURL(const GURL& url) OVERRIDE;
42
43 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
44 int child_process_id) OVERRIDE;
45
46 virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
47
48 virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host,
49 const GURL& url,
50 WebPreferences* prefs) OVERRIDE;
51
52 virtual std::string GetApplicationLocale() OVERRIDE;
53
54 virtual void AllowCertificateError(
55 int render_process_id,
56 int render_view_id,
57 int cert_error,
58 const net::SSLInfo& ssl_info,
59 const GURL& request_url,
60 ResourceType::Type resource_type,
61 bool overridable,
62 bool strict_enforcement,
63 const base::Callback<void(bool)>& callback,
64 content::CertificateRequestResultType* result) OVERRIDE;
65
66 virtual bool CanCreateWindow(
67 const GURL& opener_url,
68 const GURL& opener_top_level_frame_url,
69 const GURL& source_origin,
70 WindowContainerType container_type,
71 const GURL& target_url,
72 const content::Referrer& referrer,
73 WindowOpenDisposition disposition,
74 const blink::WebWindowFeatures& features,
75 bool user_gesture,
76 bool opener_suppressed,
77 content::ResourceContext* context,
78 int render_process_id,
79 bool is_guest,
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