| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 content (including popup) | 5 // Defines the public interface for the blocked content (including popup) |
| 6 // notifications. This interface should only be used by the | 6 // notifications. This interface should only be used by the |
| 7 // BlockedContentTabHelper. Users and subclasses of TabContents/ | 7 // BlockedContentTabHelper. Users and subclasses of TabContents/ |
| 8 // TabContentsWrapper should use the appropriate methods on | 8 // TabContentsWrapper should use the appropriate methods on |
| 9 // BlockedContentTabHelper to access information about blocked content. | 9 // BlockedContentTabHelper to access information about blocked content. |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 WindowOpenDisposition disposition, | 73 WindowOpenDisposition disposition, |
| 74 const gfx::Rect& initial_position, | 74 const gfx::Rect& initial_position, |
| 75 bool user_gesture); | 75 bool user_gesture); |
| 76 | 76 |
| 77 // Removes |source| from our internal list of blocked contents. | 77 // Removes |source| from our internal list of blocked contents. |
| 78 virtual void CloseContents(TabContents* source); | 78 virtual void CloseContents(TabContents* source); |
| 79 | 79 |
| 80 // Changes the opening rectangle associated with |source|. | 80 // Changes the opening rectangle associated with |source|. |
| 81 virtual void MoveContents(TabContents* source, const gfx::Rect& new_bounds); | 81 virtual void MoveContents(TabContents* source, const gfx::Rect& new_bounds); |
| 82 | 82 |
| 83 // Always returns true. | 83 virtual bool IsPopupOrPanel(const TabContents* source) const OVERRIDE; |
| 84 virtual bool IsPopup(const TabContents* source) const; | |
| 85 | 84 |
| 86 // Always returns true. | 85 // Always returns true. |
| 87 virtual bool ShouldSuppressDialogs(); | 86 virtual bool ShouldSuppressDialogs(); |
| 88 | 87 |
| 89 // Maximum number of blocked contents we allow. No page should really need | 88 // Maximum number of blocked contents we allow. No page should really need |
| 90 // this many anyway. If reached it typically means there is a compromised | 89 // this many anyway. If reached it typically means there is a compromised |
| 91 // renderer. | 90 // renderer. |
| 92 static const size_t kImpossibleNumberOfPopups; | 91 static const size_t kImpossibleNumberOfPopups; |
| 93 | 92 |
| 94 private: | 93 private: |
| 95 struct BlockedContent; | 94 struct BlockedContent; |
| 96 | 95 |
| 97 typedef std::vector<BlockedContent> BlockedContents; | 96 typedef std::vector<BlockedContent> BlockedContents; |
| 98 | 97 |
| 99 // The TabContents that owns and constrains this BlockedContentContainer. | 98 // The TabContents that owns and constrains this BlockedContentContainer. |
| 100 TabContentsWrapper* owner_; | 99 TabContentsWrapper* owner_; |
| 101 | 100 |
| 102 // Information about all blocked contents. | 101 // Information about all blocked contents. |
| 103 BlockedContents blocked_contents_; | 102 BlockedContents blocked_contents_; |
| 104 | 103 |
| 105 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedContentContainer); | 104 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedContentContainer); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_CONTENT_CONTAINER_H_ | 107 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_CONTENT_CONTAINER_H_ |
| OLD | NEW |