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

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

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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
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/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"
11 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" 11 #include "chrome/browser/browsing_data/browsing_data_database_helper.h"
12 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" 12 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h"
13 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" 13 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
14 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" 14 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
15 #include "chrome/browser/browsing_data/cookies_tree_model.h" 15 #include "chrome/browser/browsing_data/cookies_tree_model.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/content_settings/cookie_settings_factory.h" 17 #include "chrome/browser/content_settings/cookie_settings_factory.h"
18 #include "chrome/browser/content_settings/local_shared_objects_container.h" 18 #include "chrome/browser/content_settings/local_shared_objects_container.h"
19 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 19 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
20 #include "chrome/browser/infobars/infobar_service.h" 20 #include "chrome/browser/infobars/infobar_service.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" 22 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
23 #include "chrome/browser/ui/views/cookie_info_view.h" 23 #include "chrome/browser/ui/views/cookie_info_view.h"
24 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 24 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
25 #include "chrome/browser/ui/views/layout_utils.h"
26 #include "chrome/common/pref_names.h" 25 #include "chrome/common/pref_names.h"
27 #include "chrome/grit/generated_resources.h" 26 #include "chrome/grit/generated_resources.h"
28 #include "chrome/grit/locale_settings.h" 27 #include "chrome/grit/locale_settings.h"
29 #include "chrome/grit/theme_resources.h" 28 #include "chrome/grit/theme_resources.h"
30 #include "components/constrained_window/constrained_window_views.h" 29 #include "components/constrained_window/constrained_window_views.h"
31 #include "components/content_settings/core/browser/cookie_settings.h" 30 #include "components/content_settings/core/browser/cookie_settings.h"
32 #include "components/content_settings/core/common/pref_names.h" 31 #include "components/content_settings/core/common/pref_names.h"
33 #include "components/prefs/pref_service.h" 32 #include "components/prefs/pref_service.h"
34 #include "components/strings/grit/components_strings.h" 33 #include "components/strings/grit/components_strings.h"
35 #include "content/public/browser/notification_details.h" 34 #include "content/public/browser/notification_details.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_BLOCK_BUTTON)); 381 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_BLOCK_BUTTON));
383 382
384 delete_allowed_button_ = views::MdTextButton::CreateSecondaryUiButton(this, 383 delete_allowed_button_ = views::MdTextButton::CreateSecondaryUiButton(this,
385 l10n_util::GetStringUTF16(IDS_COOKIES_REMOVE_LABEL)); 384 l10n_util::GetStringUTF16(IDS_COOKIES_REMOVE_LABEL));
386 385
387 // Create the view that holds all the controls together. This will be the 386 // Create the view that holds all the controls together. This will be the
388 // pane added to the tabbed pane. 387 // pane added to the tabbed pane.
389 using views::GridLayout; 388 using views::GridLayout;
390 389
391 views::View* pane = new views::View(); 390 views::View* pane = new views::View();
392 GridLayout* layout = layout_utils::CreatePanelLayout(pane); 391 GridLayout* layout = GridLayout::CreatePanel(pane);
393 392
394 const int single_column_layout_id = 0; 393 const int single_column_layout_id = 0;
395 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id); 394 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id);
396 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 395 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
397 GridLayout::USE_PREF, 0, 0); 396 GridLayout::USE_PREF, 0, 0);
398 397
399 layout->StartRow(0, single_column_layout_id); 398 layout->StartRow(0, single_column_layout_id);
400 layout->AddView(allowed_label_); 399 layout->AddView(allowed_label_);
401 layout->AddPaddingRow( 400 layout->AddPaddingRow(
402 0, 401 0,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 this, l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOW_BUTTON)); 447 this, l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOW_BUTTON));
449 for_session_blocked_button_ = views::MdTextButton::CreateSecondaryUiButton( 448 for_session_blocked_button_ = views::MdTextButton::CreateSecondaryUiButton(
450 this, 449 this,
451 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_SESSION_ONLY_BUTTON)); 450 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_SESSION_ONLY_BUTTON));
452 451
453 // Create the view that holds all the controls together. This will be the 452 // Create the view that holds all the controls together. This will be the
454 // pane added to the tabbed pane. 453 // pane added to the tabbed pane.
455 using views::GridLayout; 454 using views::GridLayout;
456 455
457 views::View* pane = new views::View(); 456 views::View* pane = new views::View();
458 GridLayout* layout = layout_utils::CreatePanelLayout(pane); 457 GridLayout* layout = GridLayout::CreatePanel(pane);
459 458
460 const int single_column_layout_id = 0; 459 const int single_column_layout_id = 0;
461 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id); 460 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id);
462 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 461 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
463 GridLayout::USE_PREF, 0, 0); 462 GridLayout::USE_PREF, 0, 0);
464 463
465 layout->StartRow(0, single_column_layout_id); 464 layout->StartRow(0, single_column_layout_id);
466 layout->AddView(blocked_label_, 1, 1, GridLayout::FILL, GridLayout::FILL); 465 layout->AddView(blocked_label_, 1, 1, GridLayout::FILL, GridLayout::FILL);
467 layout->AddPaddingRow( 466 layout->AddPaddingRow(
468 0, 467 0,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 /////////////////////////////////////////////////////////////////////////////// 556 ///////////////////////////////////////////////////////////////////////////////
558 // CollectedCookiesViews, content::NotificationObserver implementation: 557 // CollectedCookiesViews, content::NotificationObserver implementation:
559 558
560 void CollectedCookiesViews::Observe( 559 void CollectedCookiesViews::Observe(
561 int type, 560 int type,
562 const content::NotificationSource& source, 561 const content::NotificationSource& source,
563 const content::NotificationDetails& details) { 562 const content::NotificationDetails& details) {
564 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); 563 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type);
565 GetWidget()->Close(); 564 GetWidget()->Close();
566 } 565 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/confirm_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698