Add ICU message format support
[chromium-blink-merge.git] / ios / web / web_state / blocked_popup_info.h
blob9373ad36cc370aa390e79f947cf71c01aa55779f
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 #ifndef IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_
6 #define IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_
8 #import <Foundation/Foundation.h>
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"
15 namespace web {
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();
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;
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_;
45 } // namespace web
47 #endif // IOS_WEB_WEB_STATE_BLOCKED_POPUP_INFO_H_