| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_views.h" | 5 #include "chrome/browser/ui/views/collected_cookies_views.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
| 9 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" |
| 10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 /////////////////////////////////////////////////////////////////////////////// | 264 /////////////////////////////////////////////////////////////////////////////// |
| 265 // CollectedCookiesViews, views::View overrides: | 265 // CollectedCookiesViews, views::View overrides: |
| 266 | 266 |
| 267 gfx::Size CollectedCookiesViews::GetMinimumSize() const { | 267 gfx::Size CollectedCookiesViews::GetMinimumSize() const { |
| 268 // Allow UpdateWebContentsModalDialogPosition to clamp the dialog width. | 268 // Allow UpdateWebContentsModalDialogPosition to clamp the dialog width. |
| 269 return gfx::Size(0, View::GetMinimumSize().height()); | 269 return gfx::Size(0, View::GetMinimumSize().height()); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void CollectedCookiesViews::ViewHierarchyChanged( | 272 void CollectedCookiesViews::ViewHierarchyChanged( |
| 273 const ViewHierarchyChangedDetails& details) { | 273 const ViewHierarchyChangedDetails& details) { |
| 274 views::DialogDelegateView::ViewHierarchyChanged(details); |
| 274 if (details.is_add && details.child == this) | 275 if (details.is_add && details.child == this) |
| 275 Init(); | 276 Init(); |
| 276 } | 277 } |
| 277 | 278 |
| 278 //////////////////////////////////////////////////////////////////////////////// | 279 //////////////////////////////////////////////////////////////////////////////// |
| 279 // CollectedCookiesViews, private: | 280 // CollectedCookiesViews, private: |
| 280 | 281 |
| 281 CollectedCookiesViews::~CollectedCookiesViews() { | 282 CollectedCookiesViews::~CollectedCookiesViews() { |
| 282 allowed_cookies_tree_->SetModel(NULL); | 283 allowed_cookies_tree_->SetModel(NULL); |
| 283 blocked_cookies_tree_->SetModel(NULL); | 284 blocked_cookies_tree_->SetModel(NULL); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 /////////////////////////////////////////////////////////////////////////////// | 533 /////////////////////////////////////////////////////////////////////////////// |
| 533 // CollectedCookiesViews, content::NotificationObserver implementation: | 534 // CollectedCookiesViews, content::NotificationObserver implementation: |
| 534 | 535 |
| 535 void CollectedCookiesViews::Observe( | 536 void CollectedCookiesViews::Observe( |
| 536 int type, | 537 int type, |
| 537 const content::NotificationSource& source, | 538 const content::NotificationSource& source, |
| 538 const content::NotificationDetails& details) { | 539 const content::NotificationDetails& details) { |
| 539 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 540 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
| 540 GetWidget()->Close(); | 541 GetWidget()->Close(); |
| 541 } | 542 } |
| OLD | NEW |