Chromium Code Reviews| 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_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ |
| 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_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/ui/website_settings/permission_bubble_request.h" | 9 #include "chrome/browser/permissions/permission_request.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 class MockPermissionBubbleRequest : public PermissionBubbleRequest { | 12 class MockPermissionRequest : public PermissionRequest { |
| 13 public: | 13 public: |
| 14 MockPermissionBubbleRequest(); | 14 MockPermissionRequest(); |
| 15 explicit MockPermissionBubbleRequest(const std::string& text); | 15 explicit MockPermissionRequest(const std::string& text); |
| 16 MockPermissionBubbleRequest(const std::string& text, | 16 MockPermissionRequest(const std::string& text, |
| 17 PermissionBubbleType bubble_type); | 17 PermissionBubbleType bubble_type); |
| 18 MockPermissionBubbleRequest(const std::string& text, const GURL& url); | 18 MockPermissionRequest(const std::string& text, const GURL& url); |
| 19 MockPermissionBubbleRequest(const std::string& text, | 19 MockPermissionRequest(const std::string& text, |
| 20 const std::string& accept_label, | 20 const std::string& accept_label, |
| 21 const std::string& deny_label); | 21 const std::string& deny_label); |
| 22 | 22 |
| 23 ~MockPermissionBubbleRequest() override; | 23 ~MockPermissionRequest() override; |
| 24 | 24 |
| 25 int GetIconId() const override; | 25 int GetIconId() const override; |
| 26 base::string16 GetMessageTextFragment() const override; | 26 base::string16 GetMessageTextFragment() const override; |
| 27 GURL GetOrigin() const override; | 27 GURL GetOrigin() const override; |
| 28 | 28 |
| 29 void PermissionGranted() override; | 29 void PermissionGranted() override; |
| 30 void PermissionDenied() override; | 30 void PermissionDenied() override; |
| 31 void Cancelled() override; | 31 void Cancelled() override; |
| 32 void RequestFinished() override; | 32 void RequestFinished() override; |
| 33 PermissionBubbleType GetPermissionBubbleType() const override; | 33 PermissionBubbleType GetPermissionBubbleType() const override; |
| 34 | 34 |
| 35 bool granted(); | 35 bool granted(); |
| 36 bool cancelled(); | 36 bool cancelled(); |
| 37 bool finished(); | 37 bool finished(); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 MockPermissionBubbleRequest(const std::string& text, | 40 MockPermissionRequest(const std::string& text, |
| 41 const std::string& accept_label, | 41 const std::string& accept_label, |
| 42 const std::string& deny_label, | 42 const std::string& deny_label, |
| 43 const GURL& url, | 43 const GURL& url, |
| 44 PermissionBubbleType bubble_type); | 44 PermissionBubbleType bubble_type); |
|
felt
2016/07/15 17:35:16
What are you planning to do with PermissionBubbleT
tsergeant
2016/07/18 01:27:47
Plan is to rename to PermissionRequestType. I was
felt
2016/07/18 04:17:17
If it's contained within all the same files, I thi
tsergeant
2016/07/18 06:55:29
Done.
| |
| 45 bool granted_; | 45 bool granted_; |
| 46 bool cancelled_; | 46 bool cancelled_; |
| 47 bool finished_; | 47 bool finished_; |
| 48 PermissionBubbleType bubble_type_; | 48 PermissionBubbleType bubble_type_; |
| 49 | 49 |
| 50 base::string16 text_; | 50 base::string16 text_; |
| 51 base::string16 accept_label_; | 51 base::string16 accept_label_; |
| 52 base::string16 deny_label_; | 52 base::string16 deny_label_; |
| 53 GURL origin_; | 53 GURL origin_; |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ | 56 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ |
| OLD | NEW |