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

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

Issue 7880003: content: Move constrained window code from TabContents to TabContentsWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac regression now that shutdown timing was changed for views. Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_win.h" 5 #include "chrome/browser/ui/views/collected_cookies_win.h"
6 6
7 #include "chrome/browser/content_settings/host_content_settings_map.h" 7 #include "chrome/browser/content_settings/host_content_settings_map.h"
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
9 #include "chrome/browser/cookies_tree_model.h" 9 #include "chrome/browser/cookies_tree_model.h"
10 #include "chrome/browser/infobars/infobar_tab_helper.h" 10 #include "chrome/browser/infobars/infobar_tab_helper.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 allow_blocked_button_(NULL), 174 allow_blocked_button_(NULL),
175 for_session_blocked_button_(NULL), 175 for_session_blocked_button_(NULL),
176 infobar_(NULL), 176 infobar_(NULL),
177 status_changed_(false) { 177 status_changed_(false) {
178 TabSpecificContentSettings* content_settings = wrapper->content_settings(); 178 TabSpecificContentSettings* content_settings = wrapper->content_settings();
179 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, 179 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN,
180 Source<TabSpecificContentSettings>(content_settings)); 180 Source<TabSpecificContentSettings>(content_settings));
181 181
182 Init(); 182 Init();
183 183
184 window_ = new ConstrainedWindowViews(wrapper->tab_contents(), this); 184 window_ = new ConstrainedWindowViews(wrapper, this);
185 } 185 }
186 186
187 CollectedCookiesWin::~CollectedCookiesWin() { 187 CollectedCookiesWin::~CollectedCookiesWin() {
188 allowed_cookies_tree_->SetModel(NULL); 188 allowed_cookies_tree_->SetModel(NULL);
189 blocked_cookies_tree_->SetModel(NULL); 189 blocked_cookies_tree_->SetModel(NULL);
190 } 190 }
191 191
192 void CollectedCookiesWin::Init() { 192 void CollectedCookiesWin::Init() {
193 using views::GridLayout; 193 using views::GridLayout;
194 194
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 503
504 /////////////////////////////////////////////////////////////////////////////// 504 ///////////////////////////////////////////////////////////////////////////////
505 // NotificationObserver implementation. 505 // NotificationObserver implementation.
506 506
507 void CollectedCookiesWin::Observe(int type, 507 void CollectedCookiesWin::Observe(int type,
508 const NotificationSource& source, 508 const NotificationSource& source,
509 const NotificationDetails& details) { 509 const NotificationDetails& details) {
510 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); 510 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
511 window_->CloseConstrainedWindow(); 511 window_->CloseConstrainedWindow();
512 } 512 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698