1 // Copyright 2014 Samsung Electronics. 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.
5 #ifndef CONTENT_BROWSER_CLIENT_EFL
6 #define CONTENT_BROWSER_CLIENT_EFL
8 #include "content/public/browser/content_browser_client.h"
17 class ResourceDispatcherHostDelegateEfl;
18 class BrowserMainPartsEfl;
19 class RenderViewHostDelegateView;
21 class WebContentsView;
22 struct ShowDesktopNotificationHostMsgParams;
24 class ContentBrowserClientEfl: public ContentBrowserClient {
26 ContentBrowserClientEfl();
28 virtual BrowserMainParts* CreateBrowserMainParts(
29 const MainFunctionParams& parameters) override;
31 virtual net::URLRequestContextGetter* CreateRequestContext(
32 BrowserContext* browser_context,
33 ProtocolHandlerMap* protocol_handlers,
34 URLRequestInterceptorScopedVector request_interceptors) override;
36 virtual AccessTokenStore* CreateAccessTokenStore() override;
38 virtual LocationProvider* OverrideSystemLocationProvider() override;
41 // Allows the embedder to pass extra command line flags.
42 // switches::kProcessType will already be set at this point.
43 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
44 int child_process_id) override;
46 virtual void ResourceDispatcherHostCreated() override;
48 virtual void AllowCertificateError(int render_process_id,
51 const net::SSLInfo& ssl_info,
52 const GURL& request_url,
53 ResourceType resource_type,
55 bool strict_enforcement,
56 bool expired_previous_decision,
57 const base::Callback<void(bool)>& callback,
58 CertificateRequestResultType* result) override;
60 // Asks permission to show desktop notifications.
61 virtual void RequestDesktopNotificationPermission(const GURL& source_origin,
62 content::RenderFrameHost* render_frame_host,
63 const base::Callback<void(blink::WebNotificationPermission)>& callback) override;
65 // Show a desktop notification. If |worker| is true, the request came from an
66 // HTML5 web worker, otherwise, it came from a renderer.
67 virtual void ShowDesktopNotification(
68 const content::ShowDesktopNotificationHostMsgParams& params,
69 content::RenderFrameHost* render_frame_host,
70 scoped_ptr<DesktopNotificationDelegate> delegate,
71 base::Closure* cancel_callback) override;
73 virtual bool AllowGetCookie(const GURL& url,
74 const GURL& first_party,
75 const net::CookieList& cookie_list,
76 content::ResourceContext* context,
77 int render_process_id,
78 int render_frame_id) override;
80 virtual bool AllowSetCookie(const GURL& url,
81 const GURL& first_party,
82 const std::string& cookie_line,
83 content::ResourceContext* context,
84 int render_process_id,
86 net::CookieOptions* options) override;
88 virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
90 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
93 scoped_ptr<ResourceDispatcherHostDelegateEfl> resource_disp_host_del_efl_;
94 EWebContext* web_context_;
95 BrowserMainPartsEfl* browser_main_parts_efl_;
97 DISALLOW_COPY_AND_ASSIGN(ContentBrowserClientEfl);
102 #endif // CONTENT_BROWSER_CLIENT_EFL