2 Copyright (C) 2014 Samsung Electronics
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef CONTENT_BROWSER_CLIENT_EFL
21 #define CONTENT_BROWSER_CLIENT_EFL
23 #include "content/public/browser/content_browser_client.h"
32 class ResourceDispatcherHostDelegateEfl;
33 class BrowserMainPartsEfl;
34 class RenderViewHostDelegateView;
36 class WebContentsView;
37 struct ShowDesktopNotificationHostMsgParams;
39 class ContentBrowserClientEfl: public ContentBrowserClient {
41 ContentBrowserClientEfl();
43 virtual BrowserMainParts* CreateBrowserMainParts(
44 const MainFunctionParams& parameters) OVERRIDE;
46 virtual net::URLRequestContextGetter* CreateRequestContext(
47 BrowserContext* browser_context,
48 ProtocolHandlerMap* protocol_handlers,
49 URLRequestInterceptorScopedVector request_interceptors) OVERRIDE;
51 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
53 virtual LocationProvider* OverrideSystemLocationProvider() OVERRIDE;
56 // Allows the embedder to pass extra command line flags.
57 // switches::kProcessType will already be set at this point.
58 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
59 int child_process_id) OVERRIDE;
61 virtual void ResourceDispatcherHostCreated() OVERRIDE;
63 virtual void AllowCertificateError(int render_process_id,
66 const net::SSLInfo& ssl_info,
67 const GURL& request_url,
68 ResourceType::Type resource_type,
70 bool strict_enforcement,
71 const base::Callback<void(bool)>& callback,
72 CertificateRequestResultType* result) OVERRIDE;
74 // Asks permission to show desktop notifications.
75 virtual void RequestDesktopNotificationPermission(const GURL& source_origin,
76 content::RenderFrameHost* render_frame_host,
77 const base::Closure& callback) OVERRIDE;
79 // Show a desktop notification. If |worker| is true, the request came from an
80 // HTML5 web worker, otherwise, it came from a renderer.
81 virtual void ShowDesktopNotification(
82 const content::ShowDesktopNotificationHostMsgParams& params,
83 content::RenderFrameHost* render_frame_host,
84 content::DesktopNotificationDelegate* delegate,
85 base::Closure* cancel_callback) OVERRIDE;
87 virtual bool AllowGetCookie(const GURL& url,
88 const GURL& first_party,
89 const net::CookieList& cookie_list,
90 content::ResourceContext* context,
91 int render_process_id,
92 int render_frame_id) OVERRIDE;
94 virtual bool AllowSetCookie(const GURL& url,
95 const GURL& first_party,
96 const std::string& cookie_line,
97 content::ResourceContext* context,
98 int render_process_id,
100 net::CookieOptions* options) OVERRIDE;
102 virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) OVERRIDE;
105 scoped_ptr<ResourceDispatcherHostDelegateEfl> resource_disp_host_del_efl_;
106 EWebContext* web_context_;
107 BrowserMainPartsEfl* browser_main_parts_efl_;
109 DISALLOW_COPY_AND_ASSIGN(ContentBrowserClientEfl);
114 #endif // CONTENT_BROWSER_CLIENT_EFL