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

Side by Side Diff: chrome/browser/permissions/mock_permission_request.h

Issue 2917343002: Run PermissionRequestManager tests on Android (Closed)
Patch Set: Created 3 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 | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/mock_permission_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_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_
6 #define CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_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/permissions/permission_request.h" 9 #include "chrome/browser/permissions/permission_request.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 class MockPermissionRequest : public PermissionRequest { 12 class MockPermissionRequest : public PermissionRequest {
13 public: 13 public:
14 MockPermissionRequest(); 14 MockPermissionRequest();
15 explicit MockPermissionRequest(const std::string& text); 15 explicit MockPermissionRequest(const std::string& text);
16 MockPermissionRequest(const std::string& text, 16 MockPermissionRequest(const std::string& text,
17 PermissionRequestType request_type, 17 PermissionRequestType request_type,
18 PermissionRequestGestureType gesture_type); 18 PermissionRequestGestureType gesture_type);
19 MockPermissionRequest(const std::string& text, const GURL& url); 19 MockPermissionRequest(const std::string& text, const GURL& url);
20 MockPermissionRequest(const std::string& text, 20 MockPermissionRequest(const std::string& text,
21 const std::string& accept_label, 21 const std::string& accept_label,
22 const std::string& deny_label); 22 const std::string& deny_label);
23 23
24 ~MockPermissionRequest() override; 24 ~MockPermissionRequest() override;
25 25
26 IconId GetIconId() const override; 26 IconId GetIconId() const override;
27 #if defined(OS_ANDROID)
28 base::string16 GetMessageText() const override;
29 #endif
27 base::string16 GetMessageTextFragment() const override; 30 base::string16 GetMessageTextFragment() const override;
28 GURL GetOrigin() const override; 31 GURL GetOrigin() const override;
29 32
30 void PermissionGranted() override; 33 void PermissionGranted() override;
31 void PermissionDenied() override; 34 void PermissionDenied() override;
32 void Cancelled() override; 35 void Cancelled() override;
33 void RequestFinished() override; 36 void RequestFinished() override;
34 PermissionRequestType GetPermissionRequestType() const override; 37 PermissionRequestType GetPermissionRequestType() const override;
35 PermissionRequestGestureType GetGestureType() const override; 38 PermissionRequestGestureType GetGestureType() const override;
36 39
(...skipping 14 matching lines...) Expand all
51 PermissionRequestType request_type_; 54 PermissionRequestType request_type_;
52 PermissionRequestGestureType gesture_type_; 55 PermissionRequestGestureType gesture_type_;
53 56
54 base::string16 text_; 57 base::string16 text_;
55 base::string16 accept_label_; 58 base::string16 accept_label_;
56 base::string16 deny_label_; 59 base::string16 deny_label_;
57 GURL origin_; 60 GURL origin_;
58 }; 61 };
59 62
60 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_ 63 #endif // CHROME_BROWSER_PERMISSIONS_MOCK_PERMISSION_REQUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/mock_permission_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698