| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Defines the public interface for the blocked popup notifications. This | 5 // Defines the public interface for the blocked popup notifications. This |
| 6 // interface should only be used by TabContents. Users and subclasses of | 6 // interface should only be used by TabContents. Users and subclasses of |
| 7 // TabContents should use the appropriate methods on TabContents to access | 7 // TabContents should use the appropriate methods on TabContents to access |
| 8 // information about blocked popups. | 8 // information about blocked popups. |
| 9 | 9 |
| 10 #ifndef CHROME_BROWSER_BLOCKED_POPUP_CONTAINER_H_ | 10 #ifndef CHROME_BROWSER_BLOCKED_POPUP_CONTAINER_H_ |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // Ignored; BlockedPopupContainer doesn't display a URL bar. | 87 // Ignored; BlockedPopupContainer doesn't display a URL bar. |
| 88 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} | 88 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} |
| 89 | 89 |
| 90 // A number larger than the internal popup count on the Renderer; meant for | 90 // A number larger than the internal popup count on the Renderer; meant for |
| 91 // preventing a compromised renderer from exhausting GDI memory by spawning | 91 // preventing a compromised renderer from exhausting GDI memory by spawning |
| 92 // infinite windows. | 92 // infinite windows. |
| 93 static const size_t kImpossibleNumberOfPopups; | 93 static const size_t kImpossibleNumberOfPopups; |
| 94 | 94 |
| 95 protected: | 95 protected: |
| 96 struct BlockedPopup { | 96 struct BlockedPopup; |
| 97 BlockedPopup(TabContents* tab_contents, | |
| 98 const gfx::Rect& bounds) | |
| 99 : tab_contents(tab_contents), bounds(bounds) { | |
| 100 } | |
| 101 | |
| 102 TabContents* tab_contents; | |
| 103 gfx::Rect bounds; | |
| 104 }; | |
| 105 typedef std::vector<BlockedPopup> BlockedPopups; | 97 typedef std::vector<BlockedPopup> BlockedPopups; |
| 106 | 98 |
| 107 private: | 99 private: |
| 108 // The TabContents that owns and constrains this BlockedPopupContainer. | 100 // The TabContents that owns and constrains this BlockedPopupContainer. |
| 109 TabContents* owner_; | 101 TabContents* owner_; |
| 110 | 102 |
| 111 // Information about all blocked popups. | 103 // Information about all blocked popups. |
| 112 BlockedPopups blocked_popups_; | 104 BlockedPopups blocked_popups_; |
| 113 | 105 |
| 114 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedPopupContainer); | 106 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedPopupContainer); |
| 115 }; | 107 }; |
| 116 | 108 |
| 117 #endif // CHROME_BROWSER_BLOCKED_POPUP_CONTAINER_H_ | 109 #endif // CHROME_BROWSER_BLOCKED_POPUP_CONTAINER_H_ |
| OLD | NEW |