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/views/collected_cookies_win.h" | 5 #include "chrome/browser/ui/views/collected_cookies_win.h" |
6 | 6 |
7 #include "chrome/browser/content_settings/host_content_settings_map.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map.h" |
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
9 #include "chrome/browser/cookies_tree_model.h" | 9 #include "chrome/browser/cookies_tree_model.h" |
10 #include "chrome/browser/infobars/infobar_tab_helper.h" | 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 allow_blocked_button_(NULL), | 174 allow_blocked_button_(NULL), |
175 for_session_blocked_button_(NULL), | 175 for_session_blocked_button_(NULL), |
176 infobar_(NULL), | 176 infobar_(NULL), |
177 status_changed_(false) { | 177 status_changed_(false) { |
178 TabSpecificContentSettings* content_settings = wrapper->content_settings(); | 178 TabSpecificContentSettings* content_settings = wrapper->content_settings(); |
179 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, | 179 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, |
180 Source<TabSpecificContentSettings>(content_settings)); | 180 Source<TabSpecificContentSettings>(content_settings)); |
181 | 181 |
182 Init(); | 182 Init(); |
183 | 183 |
184 window_ = new ConstrainedWindowViews(wrapper->tab_contents(), this); | 184 window_ = new ConstrainedWindowViews(wrapper, this); |
185 } | 185 } |
186 | 186 |
187 CollectedCookiesWin::~CollectedCookiesWin() { | 187 CollectedCookiesWin::~CollectedCookiesWin() { |
188 allowed_cookies_tree_->SetModel(NULL); | 188 allowed_cookies_tree_->SetModel(NULL); |
189 blocked_cookies_tree_->SetModel(NULL); | 189 blocked_cookies_tree_->SetModel(NULL); |
190 } | 190 } |
191 | 191 |
192 void CollectedCookiesWin::Init() { | 192 void CollectedCookiesWin::Init() { |
193 using views::GridLayout; | 193 using views::GridLayout; |
194 | 194 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 502 |
503 /////////////////////////////////////////////////////////////////////////////// | 503 /////////////////////////////////////////////////////////////////////////////// |
504 // NotificationObserver implementation. | 504 // NotificationObserver implementation. |
505 | 505 |
506 void CollectedCookiesWin::Observe(int type, | 506 void CollectedCookiesWin::Observe(int type, |
507 const NotificationSource& source, | 507 const NotificationSource& source, |
508 const NotificationDetails& details) { | 508 const NotificationDetails& details) { |
509 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); | 509 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); |
510 window_->CloseConstrainedWindow(); | 510 window_->CloseConstrainedWindow(); |
511 } | 511 } |
OLD | NEW |