| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_ |
| 6 #define IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 #include "base/ios/block_types.h" |
| 11 #include "base/mac/scoped_nsobject.h" |
| 12 #include "ios/web/public/referrer.h" |
| 13 #include "url/gurl.h" |
| 14 |
| 15 namespace web { |
| 16 |
| 17 // Contain all information related to a blocked popup. |
| 18 // TODO(eugenebut): rename to BlockedPopup as it's not an info object anymore. |
| 19 class BlockedPopupInfo { |
| 20 public: |
| 21 BlockedPopupInfo(const GURL& url, |
| 22 const Referrer& referrer, |
| 23 NSString* window_name, |
| 24 ProceduralBlock show_popup_handler); |
| 25 ~BlockedPopupInfo(); |
| 26 |
| 27 // Returns the URL of the popup that was blocked. |
| 28 const GURL& url() const { return url_; } |
| 29 // Returns the Referrer of the URL that was blocked. |
| 30 const Referrer& referrer() const { return referrer_; } |
| 31 // Returns the window name of the popup that was blocked. |
| 32 NSString* window_name() const { return window_name_; } |
| 33 // Allows the popup by opening the blocked popup window. |
| 34 void ShowPopup() const; |
| 35 |
| 36 BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info); |
| 37 void operator=(const BlockedPopupInfo& blocked_popup_info); |
| 38 private: |
| 39 GURL url_; |
| 40 Referrer referrer_; |
| 41 base::scoped_nsobject<NSString> window_name_; |
| 42 ProceduralBlock show_popup_handler_; |
| 43 }; |
| 44 |
| 45 } // namespace web |
| 46 |
| 47 #endif // IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_ |
| OLD | NEW |