Infobar material design refresh: bg color
[chromium-blink-merge.git] / ios / web / web_state / blocked_popup_info.mm
blobe1c414cc3e4e39a9aed4081bd996407225823658
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.
5 #include "ios/web/web_state/blocked_popup_info.h"
7 namespace web {
9 BlockedPopupInfo::BlockedPopupInfo(const GURL& url,
10                                    const Referrer& referrer,
11                                    NSString* window_name,
12                                    ProceduralBlock show_popup_handler)
13     : url_(url),
14       referrer_(referrer),
15       window_name_([window_name copy]),
16       show_popup_handler_([show_popup_handler copy]) {
19 BlockedPopupInfo::BlockedPopupInfo(const BlockedPopupInfo& blocked_popup_info)
20     : url_(blocked_popup_info.url_),
21       referrer_(blocked_popup_info.referrer_),
22       window_name_([blocked_popup_info.window_name_ copy]),
23       show_popup_handler_([blocked_popup_info.show_popup_handler_ copy]) {
26 BlockedPopupInfo::~BlockedPopupInfo() {}
28 void BlockedPopupInfo::ShowPopup() const {
29   show_popup_handler_();
32 void BlockedPopupInfo::operator=(const BlockedPopupInfo& blocked_popup_info) {
33   url_ = blocked_popup_info.url_;
34   referrer_ = blocked_popup_info.referrer_;
35   window_name_.reset([blocked_popup_info.window_name_ copy]);
36   show_popup_handler_ = [blocked_popup_info.show_popup_handler_ copy];
39 }  // namespace web