Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 990303002: Implement PermissionService::GetNextPermissionChange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_impl
Patch Set: review comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 WebContents* web_contents, 446 WebContents* web_contents,
447 const GURL& frame_url, 447 const GURL& frame_url,
448 const GURL& main_frame_url) {} 448 const GURL& main_frame_url) {}
449 449
450 virtual PermissionStatus GetPermissionStatus( 450 virtual PermissionStatus GetPermissionStatus(
451 PermissionType permission, 451 PermissionType permission,
452 BrowserContext* browser_context, 452 BrowserContext* browser_context,
453 const GURL& requesting_origin, 453 const GURL& requesting_origin,
454 const GURL& embedding_origin); 454 const GURL& embedding_origin);
455 455
456 // Runs the given |callback| whenever the |permission| associated with the
457 // pair { requesting_origin, embedding_origin } changes.
458 // Returns the subscription_id to be used to unsubscribe.
459 virtual int SubscribePermissionStatusChange(
460 PermissionType permission,
461 BrowserContext* browser_context,
462 const GURL& requesting_origin,
463 const GURL& embedding_origin,
464 const base::Callback<void(PermissionStatus)>& callback);
465
466 virtual void UnsubscribePermissionStatusChange(
467 BrowserContext* browser_context,
468 int subscription_id) {}
469
456 virtual void ResetPermission(PermissionType permission, 470 virtual void ResetPermission(PermissionType permission,
457 BrowserContext* browser_context, 471 BrowserContext* browser_context,
458 const GURL& requesting_origin, 472 const GURL& requesting_origin,
459 const GURL& embedding_origin) {} 473 const GURL& embedding_origin) {}
460 474
461 // Returns true if the given page is allowed to open a window of the given 475 // Returns true if the given page is allowed to open a window of the given
462 // type. If true is returned, |no_javascript_access| will indicate whether 476 // type. If true is returned, |no_javascript_access| will indicate whether
463 // the window that is created should be scriptable/in the same process. 477 // the window that is created should be scriptable/in the same process.
464 // This is called on the IO thread. 478 // This is called on the IO thread.
465 virtual bool CanCreateWindow(const GURL& opener_url, 479 virtual bool CanCreateWindow(const GURL& opener_url,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 668 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
655 // implementation. Return nullptr to disable external surface video. 669 // implementation. Return nullptr to disable external surface video.
656 virtual ExternalVideoSurfaceContainer* 670 virtual ExternalVideoSurfaceContainer*
657 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 671 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
658 #endif 672 #endif
659 }; 673 };
660 674
661 } // namespace content 675 } // namespace content
662 676
663 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 677 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698