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, const GURL& url); |
20 MockPermissionRequest(const std::string& text, | 20 MockPermissionRequest(const std::string& text, |
21 const std::string& accept_label, | 21 const std::string& accept_label, |
22 const std::string& deny_label); | 22 const std::string& deny_label); |
23 | 23 |
24 ~MockPermissionRequest() override; | 24 ~MockPermissionRequest() override; |
25 | 25 |
26 IconId GetIconId() const override; | 26 IconId GetIconId() const override; |
| 27 #if defined(OS_ANDROID) |
| 28 base::string16 GetMessageText() const override; |
| 29 #endif |
27 base::string16 GetMessageTextFragment() const override; | 30 base::string16 GetMessageTextFragment() const override; |
28 GURL GetOrigin() const override; | 31 GURL GetOrigin() const override; |
29 | 32 |
30 void PermissionGranted() override; | 33 void PermissionGranted() override; |
31 void PermissionDenied() override; | 34 void PermissionDenied() override; |
32 void Cancelled() override; | 35 void Cancelled() override; |
33 void RequestFinished() override; | 36 void RequestFinished() override; |
34 PermissionRequestType GetPermissionRequestType() const override; | 37 PermissionRequestType GetPermissionRequestType() const override; |
35 PermissionRequestGestureType GetGestureType() const override; | 38 PermissionRequestGestureType GetGestureType() const override; |
36 | 39 |
(...skipping 14 matching lines...) Expand all Loading... |
51 PermissionRequestType request_type_; | 54 PermissionRequestType request_type_; |
52 PermissionRequestGestureType gesture_type_; | 55 PermissionRequestGestureType gesture_type_; |
53 | 56 |
54 base::string16 text_; | 57 base::string16 text_; |
55 base::string16 accept_label_; | 58 base::string16 accept_label_; |
56 base::string16 deny_label_; | 59 base::string16 deny_label_; |
57 GURL origin_; | 60 GURL origin_; |
58 }; | 61 }; |
59 | 62 |
60 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ | 63 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ |
OLD | NEW |