| 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 content (including popup) | 5 // Defines the public interface for the blocked content (including popup) |
| 6 // notifications. This interface should only be used by TabContents. Users and | 6 // notifications. This interface should only be used by TabContents. Users and |
| 7 // subclasses of TabContents should use the appropriate methods on TabContents | 7 // subclasses of TabContents should use the appropriate methods on TabContents |
| 8 // to access information about blocked content. | 8 // to access information about blocked content. |
| 9 | 9 |
| 10 #ifndef CHROME_BROWSER_BLOCKED_CONTENT_CONTAINER_H_ | 10 #ifndef CHROME_BROWSER_BLOCKED_CONTENT_CONTAINER_H_ |
| 11 #define CHROME_BROWSER_BLOCKED_CONTENT_CONTAINER_H_ | 11 #define CHROME_BROWSER_BLOCKED_CONTENT_CONTAINER_H_ |
| 12 #pragma once | 12 #pragma once |
| 13 | 13 |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 16 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
| 17 | 17 |
| 18 // Takes ownership of TabContents that are unrequested popup windows. | 18 // Takes ownership of TabContents that are unrequested popup windows. |
| 19 class BlockedContentContainer : public TabContentsDelegate { | 19 class BlockedContentContainer : public TabContentsDelegate { |
| 20 public: | 20 public: |
| 21 // Creates a container for a certain TabContents: | 21 // Creates a container for a certain TabContents: |
| 22 explicit BlockedContentContainer(TabContents* owner); | 22 explicit BlockedContentContainer(TabContents* owner); |
| 23 virtual ~BlockedContentContainer(); |
| 23 | 24 |
| 24 // Adds a TabContents to this container. |bounds| are the window bounds | 25 // Adds a TabContents to this container. |bounds| are the window bounds |
| 25 // requested for the TabContents. | 26 // requested for the TabContents. |
| 26 void AddTabContents(TabContents* tab_contents, | 27 void AddTabContents(TabContents* tab_contents, |
| 27 WindowOpenDisposition disposition, | 28 WindowOpenDisposition disposition, |
| 28 const gfx::Rect& bounds, | 29 const gfx::Rect& bounds, |
| 29 bool user_gesture); | 30 bool user_gesture); |
| 30 | 31 |
| 31 // Shows the blocked TabContents |tab_contents|. | 32 // Shows the blocked TabContents |tab_contents|. |
| 32 void LaunchForContents(TabContents* tab_contents); | 33 void LaunchForContents(TabContents* tab_contents); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // The TabContents that owns and constrains this BlockedContentContainer. | 103 // The TabContents that owns and constrains this BlockedContentContainer. |
| 103 TabContents* owner_; | 104 TabContents* owner_; |
| 104 | 105 |
| 105 // Information about all blocked contents. | 106 // Information about all blocked contents. |
| 106 BlockedContents blocked_contents_; | 107 BlockedContents blocked_contents_; |
| 107 | 108 |
| 108 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedContentContainer); | 109 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockedContentContainer); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 #endif // CHROME_BROWSER_BLOCKED_CONTENT_CONTAINER_H_ | 112 #endif // CHROME_BROWSER_BLOCKED_CONTENT_CONTAINER_H_ |
| OLD | NEW |