OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PROMPT_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_FACTORY_H_ |
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_FACTORY_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_FACTORY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 void SetCanUpdateUi(bool can_update_ui); | 34 void SetCanUpdateUi(bool can_update_ui); |
35 | 35 |
36 void ResetCounts(); | 36 void ResetCounts(); |
37 | 37 |
38 void DocumentOnLoadCompletedInMainFrame(); | 38 void DocumentOnLoadCompletedInMainFrame(); |
39 | 39 |
40 void set_response_type(PermissionRequestManager::AutoResponseType type) { | 40 void set_response_type(PermissionRequestManager::AutoResponseType type) { |
41 response_type_ = type; | 41 response_type_ = type; |
42 } | 42 } |
43 | 43 |
| 44 PermissionRequestManager::AutoResponseType response_type() { |
| 45 return response_type_; |
| 46 } |
| 47 |
44 // If the current view is visible. | 48 // If the current view is visible. |
45 bool is_visible(); | 49 bool is_visible(); |
46 // Number of times |Show| was called on any bubble. | 50 // Number of times |Show| was called on any bubble. |
47 int show_count() { return show_count_; } | 51 int show_count() { return show_count_; } |
48 // Number of requests seen by the last |Show|. | 52 // Number of requests seen by the last |Show|. |
49 int request_count() { return requests_count_; } | 53 int request_count() { return requests_count_; } |
50 // Number of requests seen. | 54 // Number of requests seen. |
51 int total_request_count() { return total_requests_count_; } | 55 int total_request_count() { return total_requests_count_; } |
52 | 56 |
53 void WaitForPermissionBubble(); | 57 void WaitForPermissionBubble(); |
(...skipping 19 matching lines...) Expand all Loading... |
73 | 77 |
74 base::Closure show_bubble_quit_closure_; | 78 base::Closure show_bubble_quit_closure_; |
75 | 79 |
76 // The bubble manager that will be associated with this factory. | 80 // The bubble manager that will be associated with this factory. |
77 PermissionRequestManager* manager_; | 81 PermissionRequestManager* manager_; |
78 | 82 |
79 DISALLOW_COPY_AND_ASSIGN(MockPermissionPromptFactory); | 83 DISALLOW_COPY_AND_ASSIGN(MockPermissionPromptFactory); |
80 }; | 84 }; |
81 | 85 |
82 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_FACTORY_H_ | 86 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_MOCK_PERMISSION_PROMPT_FACTORY_H_ |
OLD | NEW |