Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: chrome/browser/ui/views/collected_cookies_views.cc

Issue 287123002: [WebModals] New API for browser-scoped popup management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make PopupManager a thin API for WCMDM Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 delete_allowed_button_(NULL), 200 delete_allowed_button_(NULL),
201 allow_blocked_button_(NULL), 201 allow_blocked_button_(NULL),
202 for_session_blocked_button_(NULL), 202 for_session_blocked_button_(NULL),
203 cookie_info_view_(NULL), 203 cookie_info_view_(NULL),
204 infobar_(NULL), 204 infobar_(NULL),
205 status_changed_(false) { 205 status_changed_(false) {
206 TabSpecificContentSettings* content_settings = 206 TabSpecificContentSettings* content_settings =
207 TabSpecificContentSettings::FromWebContents(web_contents); 207 TabSpecificContentSettings::FromWebContents(web_contents);
208 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, 208 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
209 content::Source<TabSpecificContentSettings>(content_settings)); 209 content::Source<TabSpecificContentSettings>(content_settings));
210 // TODO(gbillock): Use PopupManager here.
210 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 211 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
211 WebContentsModalDialogManager::FromWebContents(web_contents); 212 WebContentsModalDialogManager::FromWebContents(web_contents);
212 WebContentsModalDialogManagerDelegate* modal_delegate = 213 WebContentsModalDialogManagerDelegate* modal_delegate =
213 web_contents_modal_dialog_manager->delegate(); 214 web_contents_modal_dialog_manager->delegate();
214 DCHECK(modal_delegate); 215 DCHECK(modal_delegate);
215 window_ = views::Widget::CreateWindowAsFramelessChild( 216 window_ = views::Widget::CreateWindowAsFramelessChild(
216 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); 217 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView());
217 web_contents_modal_dialog_manager->ShowModalDialog( 218 web_contents_modal_dialog_manager->ShowModalDialog(
218 window_->GetNativeView()); 219 window_->GetNativeView());
219 } 220 }
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 /////////////////////////////////////////////////////////////////////////////// 563 ///////////////////////////////////////////////////////////////////////////////
563 // CollectedCookiesViews, content::NotificationObserver implementation: 564 // CollectedCookiesViews, content::NotificationObserver implementation:
564 565
565 void CollectedCookiesViews::Observe( 566 void CollectedCookiesViews::Observe(
566 int type, 567 int type,
567 const content::NotificationSource& source, 568 const content::NotificationSource& source,
568 const content::NotificationDetails& details) { 569 const content::NotificationDetails& details) {
569 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); 570 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type);
570 window_->Close(); 571 window_->Close();
571 } 572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698