Removed unused VideoCaptureCapability parameters.
[chromium-blink-merge.git] / content / public / browser / content_browser_client.cc
blob0a91186650aaca5e48153fdde20924dc58423af6
1 // Copyright (c) 2012 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.
5 #include "content/public/browser/content_browser_client.h"
7 #include "base/files/file_path.h"
8 #include "ui/gfx/image/image_skia.h"
9 #include "url/gurl.h"
11 namespace content {
13 BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts(
14 const MainFunctionParams& parameters) {
15 return NULL;
18 WebContentsViewPort* ContentBrowserClient::OverrideCreateWebContentsView(
19 WebContents* web_contents,
20 RenderViewHostDelegateView** render_view_host_delegate_view) {
21 return NULL;
24 WebContentsViewDelegate* ContentBrowserClient::GetWebContentsViewDelegate(
25 WebContents* web_contents) {
26 return NULL;
29 GURL ContentBrowserClient::GetEffectiveURL(BrowserContext* browser_context,
30 const GURL& url) {
31 return url;
34 bool ContentBrowserClient::ShouldUseProcessPerSite(
35 BrowserContext* browser_context, const GURL& effective_url) {
36 return false;
39 net::URLRequestContextGetter* ContentBrowserClient::CreateRequestContext(
40 BrowserContext* browser_context,
41 ProtocolHandlerMap* protocol_handlers) {
42 return NULL;
45 net::URLRequestContextGetter*
46 ContentBrowserClient::CreateRequestContextForStoragePartition(
47 BrowserContext* browser_context,
48 const base::FilePath& partition_path,
49 bool in_memory,
50 ProtocolHandlerMap* protocol_handlers) {
51 return NULL;
54 bool ContentBrowserClient::IsHandledURL(const GURL& url) {
55 return false;
58 bool ContentBrowserClient::CanCommitURL(RenderProcessHost* process_host,
59 const GURL& site_url) {
60 return true;
63 bool ContentBrowserClient::ShouldAllowOpenURL(SiteInstance* site_instance,
64 const GURL& url) {
65 return true;
68 bool ContentBrowserClient::IsSuitableHost(RenderProcessHost* process_host,
69 const GURL& site_url) {
70 return true;
73 bool ContentBrowserClient::ShouldTryToUseExistingProcessHost(
74 BrowserContext* browser_context, const GURL& url) {
75 return false;
78 bool ContentBrowserClient::ShouldSwapProcessesForNavigation(
79 SiteInstance* site_instance,
80 const GURL& current_url,
81 const GURL& new_url) {
82 return false;
85 bool ContentBrowserClient::ShouldSwapProcessesForRedirect(
86 ResourceContext* resource_context, const GURL& current_url,
87 const GURL& new_url) {
88 return false;
91 bool ContentBrowserClient::ShouldAssignSiteForURL(const GURL& url) {
92 return true;
95 std::string ContentBrowserClient::GetCanonicalEncodingNameByAliasName(
96 const std::string& alias_name) {
97 return std::string();
100 std::string ContentBrowserClient::GetApplicationLocale() {
101 return "en-US";
104 std::string ContentBrowserClient::GetAcceptLangs(BrowserContext* context) {
105 return std::string();
108 gfx::ImageSkia* ContentBrowserClient::GetDefaultFavicon() {
109 static gfx::ImageSkia* empty = new gfx::ImageSkia();
110 return empty;
113 bool ContentBrowserClient::AllowAppCache(const GURL& manifest_url,
114 const GURL& first_party,
115 ResourceContext* context) {
116 return true;
119 bool ContentBrowserClient::AllowGetCookie(const GURL& url,
120 const GURL& first_party,
121 const net::CookieList& cookie_list,
122 ResourceContext* context,
123 int render_process_id,
124 int render_view_id) {
125 return true;
128 bool ContentBrowserClient::AllowSetCookie(const GURL& url,
129 const GURL& first_party,
130 const std::string& cookie_line,
131 ResourceContext* context,
132 int render_process_id,
133 int render_view_id,
134 net::CookieOptions* options) {
135 return true;
138 bool ContentBrowserClient::AllowSaveLocalState(ResourceContext* context) {
139 return true;
142 bool ContentBrowserClient::AllowWorkerDatabase(
143 const GURL& url,
144 const string16& name,
145 const string16& display_name,
146 unsigned long estimated_size,
147 ResourceContext* context,
148 const std::vector<std::pair<int, int> >& render_views) {
149 return true;
152 bool ContentBrowserClient::AllowWorkerFileSystem(
153 const GURL& url,
154 ResourceContext* context,
155 const std::vector<std::pair<int, int> >& render_views) {
156 return true;
159 bool ContentBrowserClient::AllowWorkerIndexedDB(
160 const GURL& url,
161 const string16& name,
162 ResourceContext* context,
163 const std::vector<std::pair<int, int> >& render_views) {
164 return true;
167 QuotaPermissionContext* ContentBrowserClient::CreateQuotaPermissionContext() {
168 return NULL;
171 net::URLRequestContext* ContentBrowserClient::OverrideRequestContextForURL(
172 const GURL& url, ResourceContext* context) {
173 return NULL;
176 std::string ContentBrowserClient::GetStoragePartitionIdForSite(
177 BrowserContext* browser_context,
178 const GURL& site) {
179 return std::string();
182 bool ContentBrowserClient::IsValidStoragePartitionId(
183 BrowserContext* browser_context,
184 const std::string& partition_id) {
185 // Since the GetStoragePartitionIdForChildProcess() only generates empty
186 // strings, we should only ever see empty strings coming back.
187 return partition_id.empty();
190 void ContentBrowserClient::GetStoragePartitionConfigForSite(
191 BrowserContext* browser_context,
192 const GURL& site,
193 bool can_be_default,
194 std::string* partition_domain,
195 std::string* partition_name,
196 bool* in_memory) {
197 partition_domain->clear();
198 partition_name->clear();
199 *in_memory = false;
202 MediaObserver* ContentBrowserClient::GetMediaObserver() {
203 return NULL;
206 WebKit::WebNotificationPresenter::Permission
207 ContentBrowserClient::CheckDesktopNotificationPermission(
208 const GURL& source_origin,
209 ResourceContext* context,
210 int render_process_id) {
211 return WebKit::WebNotificationPresenter::PermissionAllowed;
214 bool ContentBrowserClient::CanCreateWindow(
215 const GURL& opener_url,
216 const GURL& opener_top_level_frame_url,
217 const GURL& source_origin,
218 WindowContainerType container_type,
219 const GURL& target_url,
220 const content::Referrer& referrer,
221 WindowOpenDisposition disposition,
222 const WebKit::WebWindowFeatures& features,
223 bool user_gesture,
224 bool opener_suppressed,
225 content::ResourceContext* context,
226 int render_process_id,
227 bool is_guest,
228 int opener_id,
229 bool* no_javascript_access) {
230 *no_javascript_access = false;
231 return true;
234 std::string ContentBrowserClient::GetWorkerProcessTitle(
235 const GURL& url, ResourceContext* context) {
236 return std::string();
239 SpeechRecognitionManagerDelegate*
240 ContentBrowserClient::GetSpeechRecognitionManagerDelegate() {
241 return NULL;
244 net::NetLog* ContentBrowserClient::GetNetLog() {
245 return NULL;
248 AccessTokenStore* ContentBrowserClient::CreateAccessTokenStore() {
249 return NULL;
252 bool ContentBrowserClient::IsFastShutdownPossible() {
253 return true;
256 base::FilePath ContentBrowserClient::GetDefaultDownloadDirectory() {
257 return base::FilePath();
260 std::string ContentBrowserClient::GetDefaultDownloadName() {
261 return std::string();
264 BrowserPpapiHost*
265 ContentBrowserClient::GetExternalBrowserPpapiHost(int plugin_process_id) {
266 return NULL;
269 bool ContentBrowserClient::SupportsBrowserPlugin(
270 BrowserContext* browser_context, const GURL& site_url) {
271 return false;
274 bool ContentBrowserClient::AllowPepperSocketAPI(
275 BrowserContext* browser_context,
276 const GURL& url,
277 bool private_api,
278 const SocketPermissionRequest* params) {
279 return false;
282 ui::SelectFilePolicy* ContentBrowserClient::CreateSelectFilePolicy(
283 WebContents* web_contents) {
284 return NULL;
287 LocationProvider* ContentBrowserClient::OverrideSystemLocationProvider() {
288 return NULL;
291 #if defined(OS_WIN)
292 const wchar_t* ContentBrowserClient::GetResourceDllName() {
293 return NULL;
295 #endif
297 #if defined(USE_NSS)
298 crypto::CryptoModuleBlockingPasswordDelegate*
299 ContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) {
300 return NULL;
302 #endif
304 bool ContentBrowserClient::IsPluginAllowedToCallRequestOSFileHandle(
305 content::BrowserContext* browser_context,
306 const GURL& url) {
307 return false;
310 } // namespace content