Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/browser/ui/website_settings/mock_permission_bubble_request.h

Issue 292453009: Handles iframe permissions requests separately, in a subsequent bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: unit test edit Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/mock_permission_bubble_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
38 void SetHasUserGesture();
39
36 private: 40 private:
37 bool granted_; 41 bool granted_;
38 bool cancelled_; 42 bool cancelled_;
39 bool finished_; 43 bool finished_;
44 bool user_gesture_;
40 45
41 base::string16 text_; 46 base::string16 text_;
42 base::string16 accept_label_; 47 base::string16 accept_label_;
43 base::string16 deny_label_; 48 base::string16 deny_label_;
49 GURL hostname_;
44 }; 50 };
45 51
46 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_ 52 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_BUBBLE_REQUEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/mock_permission_bubble_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698