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/api/infobars/infobar_service.h" | 7 #include "chrome/browser/api/infobars/infobar_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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 block_allowed_button_(NULL), | 191 block_allowed_button_(NULL), |
192 allow_blocked_button_(NULL), | 192 allow_blocked_button_(NULL), |
193 for_session_blocked_button_(NULL), | 193 for_session_blocked_button_(NULL), |
194 cookie_info_view_(NULL), | 194 cookie_info_view_(NULL), |
195 infobar_(NULL), | 195 infobar_(NULL), |
196 status_changed_(false) { | 196 status_changed_(false) { |
197 TabSpecificContentSettings* content_settings = | 197 TabSpecificContentSettings* content_settings = |
198 TabSpecificContentSettings::FromWebContents(web_contents); | 198 TabSpecificContentSettings::FromWebContents(web_contents); |
199 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, | 199 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, |
200 content::Source<TabSpecificContentSettings>(content_settings)); | 200 content::Source<TabSpecificContentSettings>(content_settings)); |
201 window_ = new ConstrainedWindowViews(web_contents, this); | 201 window_ = ConstrainedWindowViews::Create(web_contents, this); |
202 } | 202 } |
203 | 203 |
204 /////////////////////////////////////////////////////////////////////////////// | 204 /////////////////////////////////////////////////////////////////////////////// |
205 // CollectedCookiesViews, views::DialogDelegate implementation: | 205 // CollectedCookiesViews, views::DialogDelegate implementation: |
206 | 206 |
207 string16 CollectedCookiesViews::GetWindowTitle() const { | 207 string16 CollectedCookiesViews::GetWindowTitle() const { |
208 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE); | 208 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE); |
209 } | 209 } |
210 | 210 |
211 int CollectedCookiesViews::GetDialogButtons() const { | 211 int CollectedCookiesViews::GetDialogButtons() const { |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 /////////////////////////////////////////////////////////////////////////////// | 521 /////////////////////////////////////////////////////////////////////////////// |
522 // CollectedCookiesViews, content::NotificationObserver implementation: | 522 // CollectedCookiesViews, content::NotificationObserver implementation: |
523 | 523 |
524 void CollectedCookiesViews::Observe( | 524 void CollectedCookiesViews::Observe( |
525 int type, | 525 int type, |
526 const content::NotificationSource& source, | 526 const content::NotificationSource& source, |
527 const content::NotificationDetails& details) { | 527 const content::NotificationDetails& details) { |
528 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 528 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
529 window_->CloseWebContentsModalDialog(); | 529 window_->CloseWebContentsModalDialog(); |
530 } | 530 } |
OLD | NEW |