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_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ |
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" | 9 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 class MockPermissionBubbleRequest : public PermissionBubbleRequest { | 12 class MockPermissionBubbleRequest : public PermissionBubbleRequest { |
13 public: | 13 public: |
14 MockPermissionBubbleRequest(); | 14 MockPermissionBubbleRequest(); |
15 explicit MockPermissionBubbleRequest(const std::string& text); | 15 explicit MockPermissionBubbleRequest(const std::string& text); |
16 explicit MockPermissionBubbleRequest(const std::string& text, | 16 explicit MockPermissionBubbleRequest(const std::string& text, |
17 const GURL& url); | 17 const GURL& url); |
18 explicit MockPermissionBubbleRequest(const std::string& text, | 18 explicit MockPermissionBubbleRequest(const std::string& text, |
19 const std::string& accept_label, | 19 const std::string& accept_label, |
20 const std::string& deny_label); | 20 const std::string& deny_label); |
21 ~MockPermissionBubbleRequest() override; | 21 ~MockPermissionBubbleRequest() override; |
22 | 22 |
23 int GetIconId() const override; | 23 int GetIconId() const override; |
24 base::string16 GetMessageText() const override; | |
25 base::string16 GetMessageTextFragment() const override; | 24 base::string16 GetMessageTextFragment() const override; |
26 GURL GetOrigin() const override; | 25 GURL GetOrigin() const override; |
27 | 26 |
28 void PermissionGranted() override; | 27 void PermissionGranted() override; |
29 void PermissionDenied() override; | 28 void PermissionDenied() override; |
30 void Cancelled() override; | 29 void Cancelled() override; |
31 void RequestFinished() override; | 30 void RequestFinished() override; |
32 | 31 |
33 bool granted(); | 32 bool granted(); |
34 bool cancelled(); | 33 bool cancelled(); |
35 bool finished(); | 34 bool finished(); |
36 | 35 |
37 private: | 36 private: |
38 bool granted_; | 37 bool granted_; |
39 bool cancelled_; | 38 bool cancelled_; |
40 bool finished_; | 39 bool finished_; |
41 | 40 |
42 base::string16 text_; | 41 base::string16 text_; |
43 base::string16 accept_label_; | 42 base::string16 accept_label_; |
44 base::string16 deny_label_; | 43 base::string16 deny_label_; |
45 GURL origin_; | 44 GURL origin_; |
46 }; | 45 }; |
47 | 46 |
48 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ | 47 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ |
OLD | NEW |