| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // Creates the blocked popup with |popup_id|. | 47 // Creates the blocked popup with |popup_id|. |
| 48 void ShowBlockedPopup(int32_t popup_id); | 48 void ShowBlockedPopup(int32_t popup_id); |
| 49 | 49 |
| 50 // Returns the number of blocked popups. | 50 // Returns the number of blocked popups. |
| 51 size_t GetBlockedPopupsCount() const; | 51 size_t GetBlockedPopupsCount() const; |
| 52 | 52 |
| 53 PopupIdMap GetBlockedPopupRequests(); | 53 PopupIdMap GetBlockedPopupRequests(); |
| 54 | 54 |
| 55 // content::WebContentsObserver overrides: | 55 // content::WebContentsObserver overrides: |
| 56 void DidNavigateMainFrame( | 56 void DidFinishNavigation( |
| 57 const content::LoadCommittedDetails& details, | 57 content::NavigationHandle* navigation_handle) override; |
| 58 const content::FrameNavigateParams& params) override; | |
| 59 | 58 |
| 60 private: | 59 private: |
| 61 struct BlockedRequest; | 60 struct BlockedRequest; |
| 62 friend class content::WebContentsUserData<PopupBlockerTabHelper>; | 61 friend class content::WebContentsUserData<PopupBlockerTabHelper>; |
| 63 | 62 |
| 64 explicit PopupBlockerTabHelper(content::WebContents* web_contents); | 63 explicit PopupBlockerTabHelper(content::WebContents* web_contents); |
| 65 | 64 |
| 66 void AddBlockedPopup(const chrome::NavigateParams& params, | 65 void AddBlockedPopup(const chrome::NavigateParams& params, |
| 67 const blink::WebWindowFeatures& window_features); | 66 const blink::WebWindowFeatures& window_features); |
| 68 | 67 |
| 69 // Called when the blocked popup notification is shown or hidden. | 68 // Called when the blocked popup notification is shown or hidden. |
| 70 void PopupNotificationVisibilityChanged(bool visible); | 69 void PopupNotificationVisibilityChanged(bool visible); |
| 71 | 70 |
| 72 IDMap<std::unique_ptr<BlockedRequest>> blocked_popups_; | 71 IDMap<std::unique_ptr<BlockedRequest>> blocked_popups_; |
| 73 | 72 |
| 74 DISALLOW_COPY_AND_ASSIGN(PopupBlockerTabHelper); | 73 DISALLOW_COPY_AND_ASSIGN(PopupBlockerTabHelper); |
| 75 }; | 74 }; |
| 76 | 75 |
| 77 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_ | 76 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_POPUP_BLOCKER_TAB_HELPER_H_ |
| OLD | NEW |