| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ | 5 #ifndef CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ |
| 6 #define CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ | 6 #define CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/public/browser/permission_manager.h" | 10 #include "content/public/browser/permission_manager.h" |
| 11 | 11 |
| 12 namespace chromecast { | 12 namespace chromecast { |
| 13 namespace shell { | 13 namespace shell { |
| 14 | 14 |
| 15 class CastPermissionManager : public content::PermissionManager { | 15 class CastPermissionManager : public content::PermissionManager { |
| 16 public: | 16 public: |
| 17 CastPermissionManager(); | 17 CastPermissionManager(); |
| 18 ~CastPermissionManager() override; | 18 ~CastPermissionManager() override; |
| 19 | 19 |
| 20 // content::PermissionManager implementation: | 20 // content::PermissionManager implementation: |
| 21 int RequestPermission( | 21 int RequestPermission( |
| 22 content::PermissionType permission, | 22 content::PermissionType permission, |
| 23 content::RenderFrameHost* render_frame_host, | 23 content::RenderFrameHost* render_frame_host, |
| 24 const GURL& requesting_origin, | 24 const GURL& requesting_origin, |
| 25 bool user_gesture, |
| 25 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) | 26 const base::Callback<void(blink::mojom::PermissionStatus)>& callback) |
| 26 override; | 27 override; |
| 27 int RequestPermissions( | 28 int RequestPermissions( |
| 28 const std::vector<content::PermissionType>& permission, | 29 const std::vector<content::PermissionType>& permission, |
| 29 content::RenderFrameHost* render_frame_host, | 30 content::RenderFrameHost* render_frame_host, |
| 30 const GURL& requesting_origin, | 31 const GURL& requesting_origin, |
| 32 bool user_gesture, |
| 31 const base::Callback< | 33 const base::Callback< |
| 32 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback) | 34 void(const std::vector<blink::mojom::PermissionStatus>&)>& callback) |
| 33 override; | 35 override; |
| 34 void CancelPermissionRequest(int request_id) override; | 36 void CancelPermissionRequest(int request_id) override; |
| 35 void ResetPermission(content::PermissionType permission, | 37 void ResetPermission(content::PermissionType permission, |
| 36 const GURL& requesting_origin, | 38 const GURL& requesting_origin, |
| 37 const GURL& embedding_origin) override; | 39 const GURL& embedding_origin) override; |
| 38 blink::mojom::PermissionStatus GetPermissionStatus( | 40 blink::mojom::PermissionStatus GetPermissionStatus( |
| 39 content::PermissionType permission, | 41 content::PermissionType permission, |
| 40 const GURL& requesting_origin, | 42 const GURL& requesting_origin, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 void UnsubscribePermissionStatusChange(int subscription_id) override; | 53 void UnsubscribePermissionStatusChange(int subscription_id) override; |
| 52 | 54 |
| 53 private: | 55 private: |
| 54 DISALLOW_COPY_AND_ASSIGN(CastPermissionManager); | 56 DISALLOW_COPY_AND_ASSIGN(CastPermissionManager); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace shell | 59 } // namespace shell |
| 58 } // namespace chromecast | 60 } // namespace chromecast |
| 59 | 61 |
| 60 #endif // CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ | 62 #endif // CHROMECAST_BROWSER_CAST_PERMISSION_MANAGER_H_ |
| OLD | NEW |