OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 int render_frame_id, | 141 int render_frame_id, |
142 net::CookieOptions* options) OVERRIDE; | 142 net::CookieOptions* options) OVERRIDE; |
143 virtual bool AllowSaveLocalState(content::ResourceContext* context) OVERRIDE; | 143 virtual bool AllowSaveLocalState(content::ResourceContext* context) OVERRIDE; |
144 virtual bool AllowWorkerDatabase( | 144 virtual bool AllowWorkerDatabase( |
145 const GURL& url, | 145 const GURL& url, |
146 const base::string16& name, | 146 const base::string16& name, |
147 const base::string16& display_name, | 147 const base::string16& display_name, |
148 unsigned long estimated_size, | 148 unsigned long estimated_size, |
149 content::ResourceContext* context, | 149 content::ResourceContext* context, |
150 const std::vector<std::pair<int, int> >& render_frames) OVERRIDE; | 150 const std::vector<std::pair<int, int> >& render_frames) OVERRIDE; |
151 virtual bool AllowWorkerFileSystem( | 151 virtual void AllowWorkerFileSystem( |
152 const GURL& url, | 152 const GURL& url, |
153 content::ResourceContext* context, | 153 content::ResourceContext* context, |
154 const std::vector<std::pair<int, int> >& render_frames) OVERRIDE; | 154 const std::vector<std::pair<int, int> >& render_frames, |
| 155 base::Callback<void(bool)> callback) OVERRIDE; |
155 virtual bool AllowWorkerIndexedDB( | 156 virtual bool AllowWorkerIndexedDB( |
156 const GURL& url, | 157 const GURL& url, |
157 const base::string16& name, | 158 const base::string16& name, |
158 content::ResourceContext* context, | 159 content::ResourceContext* context, |
159 const std::vector<std::pair<int, int> >& render_frames) OVERRIDE; | 160 const std::vector<std::pair<int, int> >& render_frames) OVERRIDE; |
160 virtual net::URLRequestContext* OverrideRequestContextForURL( | 161 virtual net::URLRequestContext* OverrideRequestContextForURL( |
161 const GURL& url, content::ResourceContext* context) OVERRIDE; | 162 const GURL& url, content::ResourceContext* context) OVERRIDE; |
162 virtual content::QuotaPermissionContext* | 163 virtual content::QuotaPermissionContext* |
163 CreateQuotaPermissionContext() OVERRIDE; | 164 CreateQuotaPermissionContext() OVERRIDE; |
164 virtual void AllowCertificateError( | 165 virtual void AllowCertificateError( |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 296 |
296 private: | 297 private: |
297 #if defined(ENABLE_WEBRTC) | 298 #if defined(ENABLE_WEBRTC) |
298 // Copies disable WebRTC encryption switch depending on the channel. | 299 // Copies disable WebRTC encryption switch depending on the channel. |
299 static void MaybeCopyDisableWebRtcEncryptionSwitch( | 300 static void MaybeCopyDisableWebRtcEncryptionSwitch( |
300 base::CommandLine* to_command_line, | 301 base::CommandLine* to_command_line, |
301 const base::CommandLine& from_command_line, | 302 const base::CommandLine& from_command_line, |
302 VersionInfo::Channel channel); | 303 VersionInfo::Channel channel); |
303 #endif | 304 #endif |
304 | 305 |
| 306 void FileSystemAccessed( |
| 307 const GURL& url, |
| 308 const std::vector<std::pair<int, int> >& render_frames, |
| 309 base::Callback<void(bool)> callback, |
| 310 bool allow); |
| 311 |
| 312 #if defined(ENABLE_EXTENSIONS) |
| 313 void GuestPermissionRequestHelper( |
| 314 const GURL& url, |
| 315 const std::vector<std::pair<int, int> >& render_frames, |
| 316 base::Callback<void(bool)> callback, |
| 317 bool allow); |
| 318 |
| 319 static void RequestFileSystemPermissionOnUIThread( |
| 320 int render_process_id, |
| 321 int render_frame_id, |
| 322 const GURL& url, |
| 323 bool allowed_by_default, |
| 324 const base::Callback<void(bool)>& callback); |
| 325 #endif |
| 326 |
305 #if defined(ENABLE_PLUGINS) | 327 #if defined(ENABLE_PLUGINS) |
306 // Set of origins that can use TCP/UDP private APIs from NaCl. | 328 // Set of origins that can use TCP/UDP private APIs from NaCl. |
307 std::set<std::string> allowed_socket_origins_; | 329 std::set<std::string> allowed_socket_origins_; |
308 // Set of origins that can get a handle for FileIO from NaCl. | 330 // Set of origins that can get a handle for FileIO from NaCl. |
309 std::set<std::string> allowed_file_handle_origins_; | 331 std::set<std::string> allowed_file_handle_origins_; |
310 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable | 332 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable |
311 // versions of Chrome. | 333 // versions of Chrome. |
312 std::set<std::string> allowed_dev_channel_origins_; | 334 std::set<std::string> allowed_dev_channel_origins_; |
313 #endif | 335 #endif |
314 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> | 336 scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> |
315 permissions_policy_delegate_; | 337 permissions_policy_delegate_; |
316 | 338 |
317 // The prerender tracker used to determine whether a render process is used | 339 // The prerender tracker used to determine whether a render process is used |
318 // for prerendering and an override cookie store must be provided. | 340 // for prerendering and an override cookie store must be provided. |
319 // This needs to be kept as a member rather than just looked up from | 341 // This needs to be kept as a member rather than just looked up from |
320 // the profile due to initialization ordering, as well as due to threading. | 342 // the profile due to initialization ordering, as well as due to threading. |
321 // It is initialized on the UI thread when the ResoureDispatcherHost is | 343 // It is initialized on the UI thread when the ResoureDispatcherHost is |
322 // created. It is used only the IO thread. | 344 // created. It is used only the IO thread. |
323 prerender::PrerenderTracker* prerender_tracker_; | 345 prerender::PrerenderTracker* prerender_tracker_; |
324 | 346 |
| 347 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; |
| 348 |
325 friend class DisableWebRtcEncryptionFlagTest; | 349 friend class DisableWebRtcEncryptionFlagTest; |
326 | 350 |
327 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); | 351 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); |
328 }; | 352 }; |
329 | 353 |
330 } // namespace chrome | 354 } // namespace chrome |
331 | 355 |
332 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ | 356 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |