Chromium Code Reviews| Index: chromecast/shell/browser/cast_content_browser_client.h |
| diff --git a/chromecast/shell/browser/cast_content_browser_client.h b/chromecast/shell/browser/cast_content_browser_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e81a8be8ba5821939516dd96c9e55a0447d8b381 |
| --- /dev/null |
| +++ b/chromecast/shell/browser/cast_content_browser_client.h |
| @@ -0,0 +1,99 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| +#define CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |
| + |
| +#include "content/public/browser/content_browser_client.h" |
| + |
| +namespace content { |
| +class AccessTokenStore; |
| +enum CertificateRequestResultType; |
| +class ResourceContext; |
| +} |
|
jam
2014/07/01 21:56:10
all these forward declares aren't needed since the
lcwu1
2014/07/02 23:30:33
Done.
|
| + |
| +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.
|
| + |
| +namespace chromecast { |
| +namespace shell { |
| + |
| +class CastBrowserMainParts; |
| +class URLRequestContextFactory; |
| + |
| +class CastContentBrowserClient: public content::ContentBrowserClient { |
| + public: |
| + CastContentBrowserClient(); |
| + virtual ~CastContentBrowserClient(); |
| + |
| + // Overridden from content::ContentBrowserClient |
| + virtual content::BrowserMainParts* CreateBrowserMainParts( |
| + const content::MainFunctionParams& parameters) OVERRIDE; |
| + |
|
jam
2014/07/01 21:56:10
nit: here and below, no blank lines between overri
lcwu1
2014/07/02 23:30:33
Done.
|
| + virtual void RenderProcessWillLaunch( |
| + content::RenderProcessHost* host) OVERRIDE; |
| + |
| + virtual net::URLRequestContextGetter* CreateRequestContext( |
| + content::BrowserContext* browser_context, |
| + content::ProtocolHandlerMap* protocol_handlers, |
| + content::URLRequestInterceptorScopedVector protocol_interceptors) |
| + OVERRIDE; |
| + |
| + virtual bool IsHandledURL(const GURL& url) OVERRIDE; |
| + |
| + virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, |
| + int child_process_id) OVERRIDE; |
| + |
| + virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; |
| + |
| + virtual void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, |
| + const GURL& url, |
| + WebPreferences* prefs) OVERRIDE; |
| + |
| + virtual std::string GetApplicationLocale() OVERRIDE; |
| + |
| + virtual void AllowCertificateError( |
| + int render_process_id, |
| + int render_view_id, |
| + int cert_error, |
| + const net::SSLInfo& ssl_info, |
| + const GURL& request_url, |
| + ResourceType::Type resource_type, |
| + bool overridable, |
| + bool strict_enforcement, |
| + const base::Callback<void(bool)>& callback, |
| + content::CertificateRequestResultType* result) OVERRIDE; |
| + |
| + virtual bool CanCreateWindow( |
| + const GURL& opener_url, |
| + const GURL& opener_top_level_frame_url, |
| + const GURL& source_origin, |
| + WindowContainerType container_type, |
| + const GURL& target_url, |
| + const content::Referrer& referrer, |
| + WindowOpenDisposition disposition, |
| + const blink::WebWindowFeatures& features, |
| + bool user_gesture, |
| + bool opener_suppressed, |
| + content::ResourceContext* context, |
| + int render_process_id, |
| + int opener_id, |
| + bool* no_javascript_access) OVERRIDE; |
| + |
| + virtual void GetAdditionalMappedFilesForChildProcess( |
| + const base::CommandLine& command_line, |
| + int child_process_id, |
| + std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE; |
| + |
| + private: |
| + scoped_ptr<CastBrowserMainParts> shell_browser_main_parts_; |
| + |
| + scoped_ptr<URLRequestContextFactory> url_request_context_factory_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); |
| +}; |
| + |
| +} // namespace shell |
| +} // namespace chromecast |
| + |
| +#endif // CHROMECAST_SHELL_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ |