| 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 #include "ios/web/web_state/blocked_popup_info.h" | 5 #include "ios/web/web_state/blocked_popup_info.h" |
| 6 | 6 |
| 7 namespace web { | 7 namespace web { |
| 8 | 8 |
| 9 BlockedPopupInfo::BlockedPopupInfo(const GURL& url, | 9 BlockedPopupInfo::BlockedPopupInfo(const GURL& url, |
| 10 const Referrer& referrer, | 10 const Referrer& referrer, |
| 11 NSString* window_name, | 11 NSString* window_name, |
| 12 ProceduralBlock show_popup_handler) | 12 ProceduralBlock show_popup_handler) |
| 13 : url_(url), | 13 : url_(url), |
| 14 referrer_(referrer), | 14 referrer_(referrer), |
| 15 window_name_([window_name copy]), | 15 window_name_([window_name copy]), |
| 16 show_popup_handler_([show_popup_handler copy]){ | 16 show_popup_handler_([show_popup_handler copy]) { |
| 17 } | 17 } |
| 18 | 18 |
| 19 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info) | 19 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info) |
| 20 : url_(blocked_popup_info.url_), | 20 : url_(blocked_popup_info.url_), |
| 21 referrer_(blocked_popup_info.referrer_), | 21 referrer_(blocked_popup_info.referrer_), |
| 22 window_name_([blocked_popup_info.window_name_ copy]), | 22 window_name_([blocked_popup_info.window_name_ copy]), |
| 23 show_popup_handler_([blocked_popup_info.show_popup_handler_ copy]) { | 23 show_popup_handler_([blocked_popup_info.show_popup_handler_ copy]) { |
| 24 } | 24 } |
| 25 | 25 |
| 26 BlockedPopupInfo::~BlockedPopupInfo() {} | 26 BlockedPopupInfo::~BlockedPopupInfo() {} |
| 27 | 27 |
| 28 void BlockedPopupInfo::ShowPopup() const { | 28 void BlockedPopupInfo::ShowPopup() const { |
| 29 show_popup_handler_(); | 29 show_popup_handler_(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) { | 32 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) { |
| 33 url_ = blocked_popup_info.url_; | 33 url_ = blocked_popup_info.url_; |
| 34 referrer_ = blocked_popup_info.referrer_; | 34 referrer_ = blocked_popup_info.referrer_; |
| 35 window_name_.reset([blocked_popup_info.window_name_ copy]); | 35 window_name_.reset([blocked_popup_info.window_name_ copy]); |
| 36 show_popup_handler_ = [blocked_popup_info.show_popup_handler_ copy]; | 36 show_popup_handler_ = [blocked_popup_info.show_popup_handler_ copy]; |
| 37 } | 37 } |
| 38 | 38 |
| 39 } // namespace web | 39 } // namespace web |
| OLD | NEW |