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 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" | 5 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map.h" |
9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/blocked_content/blocked_content_container.h" | 11 #include "chrome/browser/ui/blocked_content/blocked_content_container.h" |
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
13 #include "content/browser/renderer_host/render_view_host.h" | 13 #include "content/browser/renderer_host/render_view_host.h" |
14 #include "content/browser/tab_contents/navigation_details.h" | 14 #include "content/browser/tab_contents/navigation_details.h" |
15 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
16 #include "content/common/notification_service.h" | |
17 | 16 |
18 BlockedContentTabHelper::BlockedContentTabHelper( | 17 BlockedContentTabHelper::BlockedContentTabHelper( |
19 TabContentsWrapper* tab_contents) | 18 TabContentsWrapper* tab_contents) |
20 : TabContentsObserver(tab_contents->tab_contents()), | 19 : TabContentsObserver(tab_contents->tab_contents()), |
21 blocked_contents_(new BlockedContentContainer(tab_contents)), | 20 blocked_contents_(new BlockedContentContainer(tab_contents)), |
22 all_contents_blocked_(false), | 21 all_contents_blocked_(false), |
23 tab_contents_wrapper_(tab_contents), | 22 tab_contents_wrapper_(tab_contents), |
24 delegate_(NULL) { | 23 delegate_(NULL) { |
25 } | 24 } |
26 | 25 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 115 } |
117 | 116 |
118 size_t BlockedContentTabHelper::GetBlockedContentsCount() const { | 117 size_t BlockedContentTabHelper::GetBlockedContentsCount() const { |
119 return blocked_contents_->GetBlockedContentsCount(); | 118 return blocked_contents_->GetBlockedContentsCount(); |
120 } | 119 } |
121 | 120 |
122 void BlockedContentTabHelper::GetBlockedContents( | 121 void BlockedContentTabHelper::GetBlockedContents( |
123 std::vector<TabContentsWrapper*>* blocked_contents) const { | 122 std::vector<TabContentsWrapper*>* blocked_contents) const { |
124 blocked_contents_->GetBlockedContents(blocked_contents); | 123 blocked_contents_->GetBlockedContents(blocked_contents); |
125 } | 124 } |
OLD | NEW |