| 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); |
| 18 explicit MockPermissionBubbleRequest(const std::string& text, |
| 17 const std::string& accept_label, | 19 const std::string& accept_label, |
| 18 const std::string& deny_label); | 20 const std::string& deny_label); |
| 19 virtual ~MockPermissionBubbleRequest(); | 21 virtual ~MockPermissionBubbleRequest(); |
| 20 | 22 |
| 21 virtual int GetIconID() const OVERRIDE; | 23 virtual int GetIconID() const OVERRIDE; |
| 22 virtual base::string16 GetMessageText() const OVERRIDE; | 24 virtual base::string16 GetMessageText() const OVERRIDE; |
| 23 virtual base::string16 GetMessageTextFragment() const OVERRIDE; | 25 virtual base::string16 GetMessageTextFragment() const OVERRIDE; |
| 24 virtual bool HasUserGesture() const OVERRIDE; | 26 virtual bool HasUserGesture() const OVERRIDE; |
| 25 virtual GURL GetRequestingHostname() const OVERRIDE; | 27 virtual GURL GetRequestingHostname() const OVERRIDE; |
| 26 | 28 |
| 27 virtual void PermissionGranted() OVERRIDE; | 29 virtual void PermissionGranted() OVERRIDE; |
| 28 virtual void PermissionDenied() OVERRIDE; | 30 virtual void PermissionDenied() OVERRIDE; |
| 29 virtual void Cancelled() OVERRIDE; | 31 virtual void Cancelled() OVERRIDE; |
| 30 virtual void RequestFinished() OVERRIDE; | 32 virtual void RequestFinished() OVERRIDE; |
| 31 | 33 |
| 32 bool granted(); | 34 bool granted(); |
| 33 bool cancelled(); | 35 bool cancelled(); |
| 34 bool finished(); | 36 bool finished(); |
| 35 | 37 |
| 36 private: | 38 private: |
| 37 bool granted_; | 39 bool granted_; |
| 38 bool cancelled_; | 40 bool cancelled_; |
| 39 bool finished_; | 41 bool finished_; |
| 40 | 42 |
| 41 base::string16 text_; | 43 base::string16 text_; |
| 42 base::string16 accept_label_; | 44 base::string16 accept_label_; |
| 43 base::string16 deny_label_; | 45 base::string16 deny_label_; |
| 46 GURL hostname_; |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ | 49 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ |
| OLD | NEW |