| 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/macros.h" | 7 #include "base/macros.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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 ShowCookieInfo(); | 324 ShowCookieInfo(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 views::View* CollectedCookiesViews::CreateAllowedPane() { | 327 views::View* CollectedCookiesViews::CreateAllowedPane() { |
| 328 TabSpecificContentSettings* content_settings = | 328 TabSpecificContentSettings* content_settings = |
| 329 TabSpecificContentSettings::FromWebContents(web_contents_); | 329 TabSpecificContentSettings::FromWebContents(web_contents_); |
| 330 | 330 |
| 331 // Create the controls that go into the pane. | 331 // Create the controls that go into the pane. |
| 332 allowed_label_ = new views::Label(l10n_util::GetStringUTF16( | 332 allowed_label_ = new views::Label(l10n_util::GetStringUTF16( |
| 333 IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL)); | 333 IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL)); |
| 334 allowed_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 334 | 335 |
| 335 allowed_cookies_tree_model_ = | 336 allowed_cookies_tree_model_ = |
| 336 content_settings->CreateAllowedCookiesTreeModel(); | 337 content_settings->CreateAllowedCookiesTreeModel(); |
| 337 allowed_cookies_tree_ = new views::TreeView(); | 338 allowed_cookies_tree_ = new views::TreeView(); |
| 338 allowed_cookies_tree_->SetModel(allowed_cookies_tree_model_.get()); | 339 allowed_cookies_tree_->SetModel(allowed_cookies_tree_model_.get()); |
| 339 allowed_cookies_tree_->SetRootShown(false); | 340 allowed_cookies_tree_->SetRootShown(false); |
| 340 allowed_cookies_tree_->SetEditable(false); | 341 allowed_cookies_tree_->SetEditable(false); |
| 341 allowed_cookies_tree_->set_auto_expand_children(true); | 342 allowed_cookies_tree_->set_auto_expand_children(true); |
| 342 allowed_cookies_tree_->SetController(this); | 343 allowed_cookies_tree_->SetController(this); |
| 343 | 344 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 /////////////////////////////////////////////////////////////////////////////// | 535 /////////////////////////////////////////////////////////////////////////////// |
| 535 // CollectedCookiesViews, content::NotificationObserver implementation: | 536 // CollectedCookiesViews, content::NotificationObserver implementation: |
| 536 | 537 |
| 537 void CollectedCookiesViews::Observe( | 538 void CollectedCookiesViews::Observe( |
| 538 int type, | 539 int type, |
| 539 const content::NotificationSource& source, | 540 const content::NotificationSource& source, |
| 540 const content::NotificationDetails& details) { | 541 const content::NotificationDetails& details) { |
| 541 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 542 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
| 542 GetWidget()->Close(); | 543 GetWidget()->Close(); |
| 543 } | 544 } |
| OLD | NEW |