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"
33 class ResourceDispatcherHostDelegateEfl;
34 class BrowserMainPartsEfl;
35 class RenderViewHostDelegateView;
37 class WebContentsView;
39 class ContentBrowserClientEfl: public ContentBrowserClient {
41 ContentBrowserClientEfl();
43 virtual BrowserMainParts* CreateBrowserMainParts(
44 const MainFunctionParams& parameters) OVERRIDE;
46 virtual WebContentsView* OverrideCreateWebContentsView(
47 WebContents* web_contents,
48 RenderViewHostDelegateView** delegate_view) OVERRIDE;
50 virtual net::URLRequestContextGetter* CreateRequestContext(
51 content::BrowserContext* browser_context,
52 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
54 virtual AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
56 virtual LocationProvider* OverrideSystemLocationProvider() OVERRIDE;
59 // Allows the embedder to pass extra command line flags.
60 // switches::kProcessType will already be set at this point.
61 virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
62 int child_process_id) OVERRIDE;
64 virtual void ResourceDispatcherHostCreated() OVERRIDE;
66 virtual void AllowCertificateError(int render_process_id,
69 const net::SSLInfo& ssl_info,
70 const GURL& request_url,
71 ResourceType::Type resource_type,
73 bool strict_enforcement,
74 const base::Callback<void(bool)>& callback,
75 CertificateRequestResultType* result) OVERRIDE;
77 // Asks permission to show desktop notifications.
78 virtual void RequestDesktopNotificationPermission(const GURL& source_origin,
80 int render_process_id,
81 int render_view_id) OVERRIDE;
83 // Show a desktop notification. If |worker| is true, the request came from an
84 // HTML5 web worker, otherwise, it came from a renderer.
85 virtual void ShowDesktopNotification(const ShowDesktopNotificationHostMsgParams& params,
86 int render_process_id,
88 bool worker) OVERRIDE;
90 virtual bool AllowGetCookie(const GURL& url,
91 const GURL& first_party,
92 const net::CookieList& cookie_list,
93 content::ResourceContext* context,
94 int render_process_id,
95 int render_frame_id) OVERRIDE;
97 virtual bool AllowSetCookie(const GURL& url,
98 const GURL& first_party,
99 const std::string& cookie_line,
100 content::ResourceContext* context,
101 int render_process_id,
103 net::CookieOptions* options) OVERRIDE;
105 virtual void RenderProcessWillLaunch(content::RenderProcessHost* host) OVERRIDE;
108 scoped_ptr<ResourceDispatcherHostDelegateEfl> resource_disp_host_del_efl_;
109 EWebContext* web_context_;
110 BrowserMainPartsEfl* browser_main_parts_efl_;
112 DISALLOW_COPY_AND_ASSIGN(ContentBrowserClientEfl);
117 #endif // CONTENT_BROWSER_CLIENT_EFL