| 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 "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 7 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
| 8 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
| 9 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
| 10 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 if (status_changed_) { | 225 if (status_changed_) { |
| 226 InfoBarTabHelper* infobar_helper = | 226 InfoBarTabHelper* infobar_helper = |
| 227 InfoBarTabHelper::FromWebContents(web_contents_); | 227 InfoBarTabHelper::FromWebContents(web_contents_); |
| 228 infobar_helper->AddInfoBar( | 228 infobar_helper->AddInfoBar( |
| 229 new CollectedCookiesInfoBarDelegate(infobar_helper)); | 229 new CollectedCookiesInfoBarDelegate(infobar_helper)); |
| 230 } | 230 } |
| 231 | 231 |
| 232 return true; | 232 return true; |
| 233 } | 233 } |
| 234 | 234 |
| 235 views::View* CollectedCookiesViews::GetContentsView() { | |
| 236 return this; | |
| 237 } | |
| 238 | |
| 239 ui::ModalType CollectedCookiesViews::GetModalType() const { | 235 ui::ModalType CollectedCookiesViews::GetModalType() const { |
| 240 #if defined(USE_ASH) | 236 #if defined(USE_ASH) |
| 241 return ui::MODAL_TYPE_CHILD; | 237 return ui::MODAL_TYPE_CHILD; |
| 242 #else | 238 #else |
| 243 return views::WidgetDelegate::GetModalType(); | 239 return views::WidgetDelegate::GetModalType(); |
| 244 #endif | 240 #endif |
| 245 } | 241 } |
| 246 | 242 |
| 247 /////////////////////////////////////////////////////////////////////////////// | 243 /////////////////////////////////////////////////////////////////////////////// |
| 248 // CollectedCookiesViews, views::ButtonListener implementation: | 244 // CollectedCookiesViews, views::ButtonListener implementation: |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 /////////////////////////////////////////////////////////////////////////////// | 523 /////////////////////////////////////////////////////////////////////////////// |
| 528 // CollectedCookiesViews, content::NotificationObserver implementation: | 524 // CollectedCookiesViews, content::NotificationObserver implementation: |
| 529 | 525 |
| 530 void CollectedCookiesViews::Observe( | 526 void CollectedCookiesViews::Observe( |
| 531 int type, | 527 int type, |
| 532 const content::NotificationSource& source, | 528 const content::NotificationSource& source, |
| 533 const content::NotificationDetails& details) { | 529 const content::NotificationDetails& details) { |
| 534 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 530 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
| 535 window_->CloseConstrainedWindow(); | 531 window_->CloseConstrainedWindow(); |
| 536 } | 532 } |
| OLD | NEW |