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 CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 // Returns the default download directory. | 358 // Returns the default download directory. |
359 // This can be called on any thread. | 359 // This can be called on any thread. |
360 virtual FilePath GetDefaultDownloadDirectory() = 0; | 360 virtual FilePath GetDefaultDownloadDirectory() = 0; |
361 | 361 |
362 // Returns the default filename used in downloads when we have no idea what | 362 // Returns the default filename used in downloads when we have no idea what |
363 // else we should do with the file. | 363 // else we should do with the file. |
364 virtual std::string GetDefaultDownloadName() = 0; | 364 virtual std::string GetDefaultDownloadName() = 0; |
365 | 365 |
366 // Returns true if given origin can use TCP/UDP sockets. | 366 // Returns true if given origin can use TCP/UDP sockets. |
367 virtual bool AllowSocketAPI(const GURL& url) = 0; | 367 virtual bool AllowSocketAPI(BrowserContext* browser_context, |
| 368 const GURL& url) = 0; |
368 | 369 |
369 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 370 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
370 // Can return an optional fd for crash handling, otherwise returns -1. The | 371 // Can return an optional fd for crash handling, otherwise returns -1. The |
371 // passed |command_line| will be used to start the process in question. | 372 // passed |command_line| will be used to start the process in question. |
372 virtual int GetCrashSignalFD(const CommandLine& command_line) = 0; | 373 virtual int GetCrashSignalFD(const CommandLine& command_line) = 0; |
373 #endif | 374 #endif |
374 | 375 |
375 #if defined(OS_WIN) | 376 #if defined(OS_WIN) |
376 // Returns the name of the dll that contains cursors and other resources. | 377 // Returns the name of the dll that contains cursors and other resources. |
377 virtual const wchar_t* GetResourceDllName() = 0; | 378 virtual const wchar_t* GetResourceDllName() = 0; |
378 #endif | 379 #endif |
379 | 380 |
380 #if defined(USE_NSS) | 381 #if defined(USE_NSS) |
381 // Return a delegate to authenticate and unlock |module|. | 382 // Return a delegate to authenticate and unlock |module|. |
382 // This is called on a worker thread. | 383 // This is called on a worker thread. |
383 virtual | 384 virtual |
384 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( | 385 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( |
385 const GURL& url) = 0; | 386 const GURL& url) = 0; |
386 #endif | 387 #endif |
387 }; | 388 }; |
388 | 389 |
389 } // namespace content | 390 } // namespace content |
390 | 391 |
391 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 392 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |