| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 CollectedCookiesViews::~CollectedCookiesViews() { | 303 CollectedCookiesViews::~CollectedCookiesViews() { |
| 304 allowed_cookies_tree_->SetModel(NULL); | 304 allowed_cookies_tree_->SetModel(NULL); |
| 305 blocked_cookies_tree_->SetModel(NULL); | 305 blocked_cookies_tree_->SetModel(NULL); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void CollectedCookiesViews::Init() { | 308 void CollectedCookiesViews::Init() { |
| 309 using views::GridLayout; | 309 using views::GridLayout; |
| 310 | 310 |
| 311 GridLayout* layout = new GridLayout(this); | 311 GridLayout* layout = new GridLayout(this); |
| 312 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); | 312 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); |
| 313 if (provider->UseExtraDialogPadding()) | 313 if (provider->UseExtraDialogPadding()) { |
| 314 layout->SetInsets(gfx::Insets(kTabbedPaneTopPadding, 0, 0, 0)); | 314 SetBorder( |
| 315 views::CreateEmptyBorder(gfx::Insets(kTabbedPaneTopPadding, 0, 0, 0))); |
| 316 } |
| 315 SetLayoutManager(layout); | 317 SetLayoutManager(layout); |
| 316 | 318 |
| 317 const int single_column_layout_id = 0; | 319 const int single_column_layout_id = 0; |
| 318 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id); | 320 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id); |
| 319 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, | 321 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, |
| 320 GridLayout::USE_PREF, 0, 0); | 322 GridLayout::USE_PREF, 0, 0); |
| 321 | 323 |
| 322 layout->StartRow(0, single_column_layout_id); | 324 layout->StartRow(0, single_column_layout_id); |
| 323 views::TabbedPane* tabbed_pane = new views::TabbedPane(); | 325 views::TabbedPane* tabbed_pane = new views::TabbedPane(); |
| 324 | 326 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 /////////////////////////////////////////////////////////////////////////////// | 546 /////////////////////////////////////////////////////////////////////////////// |
| 545 // CollectedCookiesViews, content::NotificationObserver implementation: | 547 // CollectedCookiesViews, content::NotificationObserver implementation: |
| 546 | 548 |
| 547 void CollectedCookiesViews::Observe( | 549 void CollectedCookiesViews::Observe( |
| 548 int type, | 550 int type, |
| 549 const content::NotificationSource& source, | 551 const content::NotificationSource& source, |
| 550 const content::NotificationDetails& details) { | 552 const content::NotificationDetails& details) { |
| 551 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 553 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
| 552 GetWidget()->Close(); | 554 GetWidget()->Close(); |
| 553 } | 555 } |
| OLD | NEW |