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

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

Issue 1017593003: Fix for making popup size proper when we have 'Block third-party cookies and site data' checkbox en… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_channel_id_helper.h" 9 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" 10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 PrefService* prefs = profile->GetPrefs(); 394 PrefService* prefs = profile->GetPrefs();
395 395
396 // Create the controls that go into the pane. 396 // Create the controls that go into the pane.
397 blocked_label_ = new views::Label( 397 blocked_label_ = new views::Label(
398 l10n_util::GetStringUTF16( 398 l10n_util::GetStringUTF16(
399 prefs->GetBoolean(prefs::kBlockThirdPartyCookies) ? 399 prefs->GetBoolean(prefs::kBlockThirdPartyCookies) ?
400 IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED : 400 IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED :
401 IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL)); 401 IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL));
402 blocked_label_->SetMultiLine(true); 402 blocked_label_->SetMultiLine(true);
403 blocked_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 403 blocked_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
404 blocked_label_->SizeToFit(kTreeViewWidth);
404 blocked_cookies_tree_model_ = 405 blocked_cookies_tree_model_ =
405 content_settings->CreateBlockedCookiesTreeModel(); 406 content_settings->CreateBlockedCookiesTreeModel();
406 blocked_cookies_tree_ = new views::TreeView(); 407 blocked_cookies_tree_ = new views::TreeView();
407 blocked_cookies_tree_->SetModel(blocked_cookies_tree_model_.get()); 408 blocked_cookies_tree_->SetModel(blocked_cookies_tree_model_.get());
408 blocked_cookies_tree_->SetRootShown(false); 409 blocked_cookies_tree_->SetRootShown(false);
409 blocked_cookies_tree_->SetEditable(false); 410 blocked_cookies_tree_->SetEditable(false);
410 blocked_cookies_tree_->set_auto_expand_children(true); 411 blocked_cookies_tree_->set_auto_expand_children(true);
411 blocked_cookies_tree_->SetController(this); 412 blocked_cookies_tree_->SetController(this);
412 413
413 allow_blocked_button_ = new views::LabelButton(this, 414 allow_blocked_button_ = new views::LabelButton(this,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 /////////////////////////////////////////////////////////////////////////////// 530 ///////////////////////////////////////////////////////////////////////////////
530 // CollectedCookiesViews, content::NotificationObserver implementation: 531 // CollectedCookiesViews, content::NotificationObserver implementation:
531 532
532 void CollectedCookiesViews::Observe( 533 void CollectedCookiesViews::Observe(
533 int type, 534 int type,
534 const content::NotificationSource& source, 535 const content::NotificationSource& source,
535 const content::NotificationDetails& details) { 536 const content::NotificationDetails& details) {
536 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); 537 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type);
537 GetWidget()->Close(); 538 GetWidget()->Close();
538 } 539 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698