| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_IMPL_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_IMPL_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "chrome/browser/permissions/permission_request.h" | 10 #include "chrome/browser/permissions/permission_request.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const PermissionDecidedCallback& permission_decided_callback, | 28 const PermissionDecidedCallback& permission_decided_callback, |
| 29 const base::Closure delete_callback); | 29 const base::Closure delete_callback); |
| 30 | 30 |
| 31 ~PermissionRequestImpl() override; | 31 ~PermissionRequestImpl() override; |
| 32 | 32 |
| 33 protected: | 33 protected: |
| 34 void RegisterActionTaken() { action_taken_ = true; } | 34 void RegisterActionTaken() { action_taken_ = true; } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // PermissionRequest: | 37 // PermissionRequest: |
| 38 #if !defined(OS_ANDROID) |
| 38 gfx::VectorIconId GetVectorIconId() const override; | 39 gfx::VectorIconId GetVectorIconId() const override; |
| 40 #endif // !OS_ANDROID |
| 39 int GetIconId() const override; | 41 int GetIconId() const override; |
| 40 base::string16 GetMessageText() const override; | 42 base::string16 GetMessageText() const override; |
| 41 base::string16 GetMessageTextFragment() const override; | 43 base::string16 GetMessageTextFragment() const override; |
| 42 GURL GetOrigin() const override; | 44 GURL GetOrigin() const override; |
| 43 // Remember to call RegisterActionTaken for these methods if you are | 45 // Remember to call RegisterActionTaken for these methods if you are |
| 44 // overriding them. | 46 // overriding them. |
| 45 void PermissionGranted() override; | 47 void PermissionGranted() override; |
| 46 void PermissionDenied() override; | 48 void PermissionDenied() override; |
| 47 void Cancelled() override; | 49 void Cancelled() override; |
| 48 void RequestFinished() override; | 50 void RequestFinished() override; |
| 49 PermissionBubbleType GetPermissionBubbleType() const override; | 51 PermissionBubbleType GetPermissionBubbleType() const override; |
| 50 | 52 |
| 51 GURL request_origin_; | 53 GURL request_origin_; |
| 52 content::PermissionType permission_type_; | 54 content::PermissionType permission_type_; |
| 53 | 55 |
| 54 // Called once a decision is made about the permission. | 56 // Called once a decision is made about the permission. |
| 55 const PermissionDecidedCallback permission_decided_callback_; | 57 const PermissionDecidedCallback permission_decided_callback_; |
| 56 | 58 |
| 57 // Called when the request is no longer in use so it can be deleted by the | 59 // Called when the request is no longer in use so it can be deleted by the |
| 58 // caller. | 60 // caller. |
| 59 const base::Closure delete_callback_; | 61 const base::Closure delete_callback_; |
| 60 bool is_finished_; | 62 bool is_finished_; |
| 61 bool action_taken_; | 63 bool action_taken_; |
| 62 | 64 |
| 63 DISALLOW_COPY_AND_ASSIGN(PermissionRequestImpl); | 65 DISALLOW_COPY_AND_ASSIGN(PermissionRequestImpl); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_IMPL_H_ | 68 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_IMPL_H_ |
| OLD | NEW |