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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 int render_process_id); | 461 int render_process_id); |
462 | 462 |
463 // Show a desktop notification. If |cancel_callback| is non-null, it's set to | 463 // Show a desktop notification. If |cancel_callback| is non-null, it's set to |
464 // a callback which can be used to cancel the notification. | 464 // a callback which can be used to cancel the notification. |
465 virtual void ShowDesktopNotification( | 465 virtual void ShowDesktopNotification( |
466 const ShowDesktopNotificationHostMsgParams& params, | 466 const ShowDesktopNotificationHostMsgParams& params, |
467 RenderFrameHost* render_frame_host, | 467 RenderFrameHost* render_frame_host, |
468 DesktopNotificationDelegate* delegate, | 468 DesktopNotificationDelegate* delegate, |
469 base::Closure* cancel_callback) {} | 469 base::Closure* cancel_callback) {} |
470 | 470 |
| 471 // The renderer is requesting permission to use Geolocation. When the answer |
| 472 // to a permission request has been determined, |result_callback| should be |
| 473 // called with the result. If |cancel_callback| is non-null, it's set to a |
| 474 // callback which can be used to cancel the permission request. |
| 475 virtual void RequestGeolocationPermission( |
| 476 WebContents* web_contents, |
| 477 int bridge_id, |
| 478 const GURL& requesting_frame, |
| 479 bool user_gesture, |
| 480 base::Callback<void(bool)> result_callback, |
| 481 base::Closure* cancel_callback); |
| 482 |
471 // Returns true if the given page is allowed to open a window of the given | 483 // Returns true if the given page is allowed to open a window of the given |
472 // type. If true is returned, |no_javascript_access| will indicate whether | 484 // type. If true is returned, |no_javascript_access| will indicate whether |
473 // the window that is created should be scriptable/in the same process. | 485 // the window that is created should be scriptable/in the same process. |
474 // This is called on the IO thread. | 486 // This is called on the IO thread. |
475 virtual bool CanCreateWindow(const GURL& opener_url, | 487 virtual bool CanCreateWindow(const GURL& opener_url, |
476 const GURL& opener_top_level_frame_url, | 488 const GURL& opener_top_level_frame_url, |
477 const GURL& source_origin, | 489 const GURL& source_origin, |
478 WindowContainerType container_type, | 490 WindowContainerType container_type, |
479 const GURL& target_url, | 491 const GURL& target_url, |
480 const Referrer& referrer, | 492 const Referrer& referrer, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 // Return NULL to use the default one for the platform to be created. | 606 // Return NULL to use the default one for the platform to be created. |
595 // FYI: Used by an external project; please don't remove. | 607 // FYI: Used by an external project; please don't remove. |
596 // Contact Viatcheslav Ostapenko at sl.ostapenko@samsung.com for more | 608 // Contact Viatcheslav Ostapenko at sl.ostapenko@samsung.com for more |
597 // information. | 609 // information. |
598 virtual VibrationProvider* OverrideVibrationProvider(); | 610 virtual VibrationProvider* OverrideVibrationProvider(); |
599 | 611 |
600 // Creates a new DevToolsManagerDelegate. The caller owns the returned value. | 612 // Creates a new DevToolsManagerDelegate. The caller owns the returned value. |
601 // It's valid to return NULL. | 613 // It's valid to return NULL. |
602 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate(); | 614 virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate(); |
603 | 615 |
| 616 // Returns true if plugin referred to by the url can use |
| 617 // pp::FileIO::RequestOSFileHandle. |
| 618 virtual bool IsPluginAllowedToCallRequestOSFileHandle( |
| 619 BrowserContext* browser_context, |
| 620 const GURL& url); |
| 621 |
| 622 // Returns true if dev channel APIs are available for plugins. |
| 623 virtual bool IsPluginAllowedToUseDevChannelAPIs(); |
| 624 |
| 625 // Returns a special cookie store to use for a given render process, or NULL |
| 626 // if the default cookie store should be used |
| 627 // This is called on the IO thread. |
| 628 virtual net::CookieStore* OverrideCookieStoreForRenderProcess( |
| 629 int render_process_id); |
| 630 |
604 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 631 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
605 // Populates |mappings| with all files that need to be mapped before launching | 632 // Populates |mappings| with all files that need to be mapped before launching |
606 // a child process. | 633 // a child process. |
607 virtual void GetAdditionalMappedFilesForChildProcess( | 634 virtual void GetAdditionalMappedFilesForChildProcess( |
608 const base::CommandLine& command_line, | 635 const base::CommandLine& command_line, |
609 int child_process_id, | 636 int child_process_id, |
610 std::vector<FileDescriptorInfo>* mappings) {} | 637 std::vector<FileDescriptorInfo>* mappings) {} |
611 #endif | 638 #endif |
612 | 639 |
613 #if defined(OS_WIN) | 640 #if defined(OS_WIN) |
614 // Returns the name of the dll that contains cursors and other resources. | 641 // Returns the name of the dll that contains cursors and other resources. |
615 virtual const wchar_t* GetResourceDllName(); | 642 virtual const wchar_t* GetResourceDllName(); |
616 | 643 |
617 // This is called on the PROCESS_LAUNCHER thread before the renderer process | 644 // This is called on the PROCESS_LAUNCHER thread before the renderer process |
618 // is launched. It gives the embedder a chance to add loosen the sandbox | 645 // is launched. It gives the embedder a chance to add loosen the sandbox |
619 // policy. | 646 // policy. |
620 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, | 647 virtual void PreSpawnRenderer(sandbox::TargetPolicy* policy, |
621 bool* success) {} | 648 bool* success) {} |
622 #endif | 649 #endif |
623 | 650 |
624 // Returns true if plugin referred to by the url can use | |
625 // pp::FileIO::RequestOSFileHandle. | |
626 virtual bool IsPluginAllowedToCallRequestOSFileHandle( | |
627 BrowserContext* browser_context, | |
628 const GURL& url); | |
629 | |
630 // Returns true if dev channel APIs are available for plugins. | |
631 virtual bool IsPluginAllowedToUseDevChannelAPIs(); | |
632 | |
633 // Returns a special cookie store to use for a given render process, or NULL | |
634 // if the default cookie store should be used | |
635 // This is called on the IO thread. | |
636 virtual net::CookieStore* OverrideCookieStoreForRenderProcess( | |
637 int render_process_id); | |
638 | |
639 #if defined(VIDEO_HOLE) | 651 #if defined(VIDEO_HOLE) |
640 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 652 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
641 // implementation. Return NULL to disable external surface video. | 653 // implementation. Return NULL to disable external surface video. |
642 virtual ExternalVideoSurfaceContainer* | 654 virtual ExternalVideoSurfaceContainer* |
643 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 655 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
644 #endif | 656 #endif |
645 }; | 657 }; |
646 | 658 |
647 } // namespace content | 659 } // namespace content |
648 | 660 |
649 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 661 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |