| 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_MOCK_PERMISSION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ |
| 6 #define CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ | 6 #define CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "chrome/browser/permissions/permission_request.h" | 9 #include "chrome/browser/permissions/permission_request.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 class MockPermissionRequest : public PermissionRequest { | 12 class MockPermissionRequest : public PermissionRequest { |
| 13 public: | 13 public: |
| 14 MockPermissionRequest(); | 14 MockPermissionRequest(); |
| 15 explicit MockPermissionRequest(const std::string& text); | 15 explicit MockPermissionRequest(const std::string& text); |
| 16 MockPermissionRequest(const std::string& text, | 16 MockPermissionRequest(const std::string& text, |
| 17 PermissionRequestType request_type, | 17 PermissionRequestType request_type, |
| 18 PermissionRequestGestureType gesture_type); | 18 PermissionRequestGestureType gesture_type); |
| 19 MockPermissionRequest(const std::string& text, const GURL& url); | 19 MockPermissionRequest(const std::string& text, |
| 20 PermissionRequestType request_type, |
| 21 const GURL& url); |
| 20 MockPermissionRequest(const std::string& text, | 22 MockPermissionRequest(const std::string& text, |
| 21 const std::string& accept_label, | 23 const std::string& accept_label, |
| 22 const std::string& deny_label); | 24 const std::string& deny_label); |
| 23 | 25 |
| 24 ~MockPermissionRequest() override; | 26 ~MockPermissionRequest() override; |
| 25 | 27 |
| 26 IconId GetIconId() const override; | 28 IconId GetIconId() const override; |
| 27 base::string16 GetMessageTextFragment() const override; | 29 base::string16 GetMessageTextFragment() const override; |
| 28 GURL GetOrigin() const override; | 30 GURL GetOrigin() const override; |
| 29 | 31 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 51 PermissionRequestType request_type_; | 53 PermissionRequestType request_type_; |
| 52 PermissionRequestGestureType gesture_type_; | 54 PermissionRequestGestureType gesture_type_; |
| 53 | 55 |
| 54 base::string16 text_; | 56 base::string16 text_; |
| 55 base::string16 accept_label_; | 57 base::string16 accept_label_; |
| 56 base::string16 deny_label_; | 58 base::string16 deny_label_; |
| 57 GURL origin_; | 59 GURL origin_; |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ | 62 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ |
| OLD | NEW |