| 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_cookie_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
| 10 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 212 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| 213 WebContentsModalDialogManager::FromWebContents(web_contents); | 213 WebContentsModalDialogManager::FromWebContents(web_contents); |
| 214 WebContentsModalDialogManagerDelegate* modal_delegate = | 214 WebContentsModalDialogManagerDelegate* modal_delegate = |
| 215 web_contents_modal_dialog_manager->delegate(); | 215 web_contents_modal_dialog_manager->delegate(); |
| 216 DCHECK(modal_delegate); | 216 DCHECK(modal_delegate); |
| 217 window_ = views::Widget::CreateWindowAsFramelessChild( | 217 window_ = views::Widget::CreateWindowAsFramelessChild( |
| 218 this, | 218 this, |
| 219 web_contents->GetView()->GetNativeView(), | 219 web_contents->GetView()->GetNativeView(), |
| 220 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 220 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
| 221 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); | 221 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); |
| 222 web_contents_modal_dialog_manager->SetCloseOnInterstitialWebUI( |
| 223 window_->GetNativeView(), true); |
| 222 } | 224 } |
| 223 | 225 |
| 224 /////////////////////////////////////////////////////////////////////////////// | 226 /////////////////////////////////////////////////////////////////////////////// |
| 225 // CollectedCookiesViews, views::DialogDelegate implementation: | 227 // CollectedCookiesViews, views::DialogDelegate implementation: |
| 226 | 228 |
| 227 string16 CollectedCookiesViews::GetWindowTitle() const { | 229 string16 CollectedCookiesViews::GetWindowTitle() const { |
| 228 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE); | 230 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE); |
| 229 } | 231 } |
| 230 | 232 |
| 231 int CollectedCookiesViews::GetDialogButtons() const { | 233 int CollectedCookiesViews::GetDialogButtons() const { |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 /////////////////////////////////////////////////////////////////////////////// | 573 /////////////////////////////////////////////////////////////////////////////// |
| 572 // CollectedCookiesViews, content::NotificationObserver implementation: | 574 // CollectedCookiesViews, content::NotificationObserver implementation: |
| 573 | 575 |
| 574 void CollectedCookiesViews::Observe( | 576 void CollectedCookiesViews::Observe( |
| 575 int type, | 577 int type, |
| 576 const content::NotificationSource& source, | 578 const content::NotificationSource& source, |
| 577 const content::NotificationDetails& details) { | 579 const content::NotificationDetails& details) { |
| 578 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 580 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
| 579 window_->Close(); | 581 window_->Close(); |
| 580 } | 582 } |
| OLD | NEW |