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/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 friend class PermissionBubbleManagerTest; | 60 friend class PermissionBubbleManagerTest; |
61 friend class DownloadRequestLimiterTest; | 61 friend class DownloadRequestLimiterTest; |
62 friend class content::WebContentsUserData<PermissionBubbleManager>; | 62 friend class content::WebContentsUserData<PermissionBubbleManager>; |
63 | 63 |
64 explicit PermissionBubbleManager(content::WebContents* web_contents); | 64 explicit PermissionBubbleManager(content::WebContents* web_contents); |
65 | 65 |
66 // WebContentsObserver: | 66 // WebContentsObserver: |
67 | 67 |
68 // TODO(leng): Finalize policy for permission requests with iFrames. | 68 // TODO(leng): Finalize policy for permission requests with iFrames. |
69 // DocumentLoadedInFrame() might be needed as well. | 69 // DocumentLoadedInFrame() might be needed as well. |
70 virtual void DocumentOnLoadCompletedInMainFrame(int32 page_id) OVERRIDE; | 70 virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE; |
71 | 71 |
72 // If a page on which permissions requests are pending is navigated, | 72 // If a page on which permissions requests are pending is navigated, |
73 // they will be finalized as if canceled by the user. | 73 // they will be finalized as if canceled by the user. |
74 virtual void NavigationEntryCommitted( | 74 virtual void NavigationEntryCommitted( |
75 const content::LoadCommittedDetails& details) OVERRIDE; | 75 const content::LoadCommittedDetails& details) OVERRIDE; |
76 virtual void WebContentsDestroyed( | 76 virtual void WebContentsDestroyed( |
77 content::WebContents* web_contents) OVERRIDE; | 77 content::WebContents* web_contents) OVERRIDE; |
78 | 78 |
79 // PermissionBubbleView::Delegate: | 79 // PermissionBubbleView::Delegate: |
80 virtual void ToggleAccept(int request_index, bool new_value) OVERRIDE; | 80 virtual void ToggleAccept(int request_index, bool new_value) OVERRIDE; |
(...skipping 22 matching lines...) Expand all Loading... |
103 std::vector<PermissionBubbleRequest*> queued_requests_; | 103 std::vector<PermissionBubbleRequest*> queued_requests_; |
104 GURL request_url_; | 104 GURL request_url_; |
105 bool request_url_has_loaded_; | 105 bool request_url_has_loaded_; |
106 std::vector<bool> accept_states_; | 106 std::vector<bool> accept_states_; |
107 bool customization_mode_; | 107 bool customization_mode_; |
108 | 108 |
109 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; | 109 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; |
110 }; | 110 }; |
111 | 111 |
112 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 112 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
OLD | NEW |