Add ability to gather metrics to BubbleManager.
[chromium-blink-merge.git] / chrome / browser / ui / website_settings / mock_permission_bubble_request.h
blob9014ec95061844eb0510b0d9c6abd0c63091047b
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_
8 #include "base/strings/string16.h"
9 #include "chrome/browser/ui/website_settings/permission_bubble_request.h"
10 #include "url/gurl.h"
12 class MockPermissionBubbleRequest : public PermissionBubbleRequest {
13 public:
14 MockPermissionBubbleRequest();
15 explicit MockPermissionBubbleRequest(const std::string& text);
16 explicit MockPermissionBubbleRequest(const std::string& text,
17 const GURL& url);
18 explicit MockPermissionBubbleRequest(const std::string& text,
19 const std::string& accept_label,
20 const std::string& deny_label);
21 ~MockPermissionBubbleRequest() override;
23 int GetIconId() const override;
24 base::string16 GetMessageText() const override;
25 base::string16 GetMessageTextFragment() const override;
26 bool HasUserGesture() const override;
27 GURL GetRequestingHostname() const override;
29 void PermissionGranted() override;
30 void PermissionDenied() override;
31 void Cancelled() override;
32 void RequestFinished() override;
34 bool granted();
35 bool cancelled();
36 bool finished();
38 void SetHasUserGesture();
40 private:
41 bool granted_;
42 bool cancelled_;
43 bool finished_;
44 bool user_gesture_;
46 base::string16 text_;
47 base::string16 accept_label_;
48 base::string16 deny_label_;
49 GURL hostname_;
52 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_