OLD | NEW |
(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 } |
| 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::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_ |
OLD | NEW |