| 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 | 421 |
| 422 // Returns a class to get notifications about media event. The embedder can | 422 // Returns a class to get notifications about media event. The embedder can |
| 423 // return nullptr if they're not interested. | 423 // return nullptr if they're not interested. |
| 424 virtual MediaObserver* GetMediaObserver(); | 424 virtual MediaObserver* GetMediaObserver(); |
| 425 | 425 |
| 426 // Returns the platform notification service, capable of displaying Web | 426 // Returns the platform notification service, capable of displaying Web |
| 427 // Notifications to the user. The embedder can return a nullptr if they don't | 427 // Notifications to the user. The embedder can return a nullptr if they don't |
| 428 // support this functionality. May be called from any thread. | 428 // support this functionality. May be called from any thread. |
| 429 virtual PlatformNotificationService* GetPlatformNotificationService(); | 429 virtual PlatformNotificationService* GetPlatformNotificationService(); |
| 430 | 430 |
| 431 virtual void RequestPermission( | |
| 432 PermissionType permission, | |
| 433 WebContents* web_contents, | |
| 434 int bridge_id, | |
| 435 const GURL& requesting_frame, | |
| 436 bool user_gesture, | |
| 437 const base::Callback<void(PermissionStatus)>& callback); | |
| 438 | |
| 439 virtual void CancelPermissionRequest(PermissionType permission, | |
| 440 WebContents* web_contents, | |
| 441 int bridge_id, | |
| 442 const GURL& requesting_frame) {} | |
| 443 | |
| 444 virtual void RegisterPermissionUsage(PermissionType permission, | |
| 445 WebContents* web_contents, | |
| 446 const GURL& frame_url, | |
| 447 const GURL& main_frame_url) {} | |
| 448 | |
| 449 virtual PermissionStatus GetPermissionStatus( | |
| 450 PermissionType permission, | |
| 451 BrowserContext* browser_context, | |
| 452 const GURL& requesting_origin, | |
| 453 const GURL& embedding_origin); | |
| 454 | |
| 455 virtual void ResetPermission(PermissionType permission, | |
| 456 BrowserContext* browser_context, | |
| 457 const GURL& requesting_origin, | |
| 458 const GURL& embedding_origin) {} | |
| 459 | |
| 460 // Returns true if the given page is allowed to open a window of the given | 431 // Returns true if the given page is allowed to open a window of the given |
| 461 // type. If true is returned, |no_javascript_access| will indicate whether | 432 // type. If true is returned, |no_javascript_access| will indicate whether |
| 462 // the window that is created should be scriptable/in the same process. | 433 // the window that is created should be scriptable/in the same process. |
| 463 // This is called on the IO thread. | 434 // This is called on the IO thread. |
| 464 virtual bool CanCreateWindow(const GURL& opener_url, | 435 virtual bool CanCreateWindow(const GURL& opener_url, |
| 465 const GURL& opener_top_level_frame_url, | 436 const GURL& opener_top_level_frame_url, |
| 466 const GURL& source_origin, | 437 const GURL& source_origin, |
| 467 WindowContainerType container_type, | 438 WindowContainerType container_type, |
| 468 const GURL& target_url, | 439 const GURL& target_url, |
| 469 const Referrer& referrer, | 440 const Referrer& referrer, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 618 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
| 648 // implementation. Return nullptr to disable external surface video. | 619 // implementation. Return nullptr to disable external surface video. |
| 649 virtual ExternalVideoSurfaceContainer* | 620 virtual ExternalVideoSurfaceContainer* |
| 650 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 621 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
| 651 #endif | 622 #endif |
| 652 }; | 623 }; |
| 653 | 624 |
| 654 } // namespace content | 625 } // namespace content |
| 655 | 626 |
| 656 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 627 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |