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_PERMISSION_BUBBLE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 // Add a new request to the permission bubble. Ownership of the request | 38 // Add a new request to the permission bubble. Ownership of the request |
39 // remains with the caller. The caller must arrange for the request to | 39 // remains with the caller. The caller must arrange for the request to |
40 // outlive the PermissionBubbleManager. If a bubble is visible when this | 40 // outlive the PermissionBubbleManager. If a bubble is visible when this |
41 // call is made, the request will be queued up and shown after the current | 41 // call is made, the request will be queued up and shown after the current |
42 // bubble closes. | 42 // bubble closes. |
43 virtual void AddRequest(PermissionBubbleRequest* request); | 43 virtual void AddRequest(PermissionBubbleRequest* request); |
44 | 44 |
45 // Set the active view for the permission bubble. If this is NULL, it | 45 // Set the active view for the permission bubble. If this is NULL, it |
46 // means the permission bubble is no longer showing. | 46 // means the permission bubble is no longer showing. |
47 virtual void SetView(PermissionBubbleView* view); | 47 virtual void SetView(PermissionBubbleView* view) OVERRIDE; |
48 | 48 |
49 protected: | 49 protected: |
50 // Sets the coalesce time interval to |interval_ms|. For testing only. | 50 // Sets the coalesce time interval to |interval_ms|. For testing only. |
51 void SetCoalesceIntervalForTesting(int interval_ms); | 51 void SetCoalesceIntervalForTesting(int interval_ms); |
52 | 52 |
53 private: | 53 private: |
54 friend class PermissionBubbleManagerTest; | 54 friend class PermissionBubbleManagerTest; |
55 friend class content::WebContentsUserData<PermissionBubbleManager>; | 55 friend class content::WebContentsUserData<PermissionBubbleManager>; |
56 | 56 |
57 explicit PermissionBubbleManager(content::WebContents* web_contents); | 57 explicit PermissionBubbleManager(content::WebContents* web_contents); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 std::vector<PermissionBubbleRequest*> requests_; | 90 std::vector<PermissionBubbleRequest*> requests_; |
91 std::vector<PermissionBubbleRequest*> queued_requests_; | 91 std::vector<PermissionBubbleRequest*> queued_requests_; |
92 std::vector<bool> accept_states_; | 92 std::vector<bool> accept_states_; |
93 bool customization_mode_; | 93 bool customization_mode_; |
94 | 94 |
95 scoped_ptr<base::Timer> timer_; | 95 scoped_ptr<base::Timer> timer_; |
96 }; | 96 }; |
97 | 97 |
98 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 98 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
OLD | NEW |