| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 // Changes the opening rectangle associated with |source|. | 88 // Changes the opening rectangle associated with |source|. |
| 89 virtual void MoveContents(TabContents* source, const gfx::Rect& new_bounds); | 89 virtual void MoveContents(TabContents* source, const gfx::Rect& new_bounds); |
| 90 | 90 |
| 91 // Always returns true. | 91 // Always returns true. |
| 92 virtual bool IsPopup(const TabContents* source) const; | 92 virtual bool IsPopup(const TabContents* source) const; |
| 93 | 93 |
| 94 // Ignored; BlockedContentContainer doesn't display a URL bar. | 94 // Ignored; BlockedContentContainer doesn't display a URL bar. |
| 95 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} | 95 virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} |
| 96 | 96 |
| 97 // Always returns true. |
| 98 virtual bool ShouldSuppressDialogs(); |
| 99 |
| 97 // Maximum number of blocked contents we allow. No page should really need | 100 // Maximum number of blocked contents we allow. No page should really need |
| 98 // this many anyway. If reached it typically means there is a compromised | 101 // this many anyway. If reached it typically means there is a compromised |
| 99 // renderer. | 102 // renderer. |
| 100 static const size_t kImpossibleNumberOfPopups; | 103 static const size_t kImpossibleNumberOfPopups; |
| 101 | 104 |
| 102 private: | 105 private: |
| 103 struct BlockedContent; | 106 struct BlockedContent; |
| 104 | 107 |
| 105 typedef std::vector<BlockedContent> BlockedContents; | 108 typedef std::vector<BlockedContent> BlockedContents; |
| 106 | 109 |
| 107 // The TabContents that owns and constrains this BlockedContentContainer. | 110 // The TabContents that owns and constrains this BlockedContentContainer. |
| 108 TabContentsWrapper* owner_; | 111 TabContentsWrapper* owner_; |
| 109 | 112 |
| 110 // Information about all blocked contents. | 113 // Information about all blocked contents. |
| 111 BlockedContents blocked_contents_; | 114 BlockedContents blocked_contents_; |
| 112 | 115 |
| 113 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedContentContainer); | 116 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedContentContainer); |
| 114 }; | 117 }; |
| 115 | 118 |
| 116 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_CONTENT_CONTAINER_H_ | 119 #endif // CHROME_BROWSER_UI_BLOCKED_CONTENT_BLOCKED_CONTENT_CONTAINER_H_ |
| OLD | NEW |