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

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

Issue 2934503002: Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Created 3 years, 6 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"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 l10n_util::GetStringUTF16(IDS_COOKIES_REMOVE_LABEL)); 382 l10n_util::GetStringUTF16(IDS_COOKIES_REMOVE_LABEL));
383 383
384 // Create the view that holds all the controls together. This will be the 384 // Create the view that holds all the controls together. This will be the
385 // pane added to the tabbed pane. 385 // pane added to the tabbed pane.
386 using views::GridLayout; 386 using views::GridLayout;
387 387
388 views::View* pane = new views::View(); 388 views::View* pane = new views::View();
389 GridLayout* layout = GridLayout::CreatePanel(pane); 389 GridLayout* layout = GridLayout::CreatePanel(pane);
390 int unrelated_vertical_distance = 390 int unrelated_vertical_distance =
391 ChromeLayoutProvider::Get()->GetDistanceMetric( 391 ChromeLayoutProvider::Get()->GetDistanceMetric(
392 DISTANCE_UNRELATED_CONTROL_VERTICAL); 392 views::DISTANCE_UNRELATED_CONTROL_VERTICAL);
393 393
394 const int single_column_layout_id = 0; 394 const int single_column_layout_id = 0;
395 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id); 395 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id);
396 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 396 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
397 GridLayout::USE_PREF, 0, 0); 397 GridLayout::USE_PREF, 0, 0);
398 398
399 layout->StartRow(0, single_column_layout_id); 399 layout->StartRow(0, single_column_layout_id);
400 layout->AddView(allowed_label_); 400 layout->AddView(allowed_label_);
401 layout->AddPaddingRow(0, unrelated_vertical_distance); 401 layout->AddPaddingRow(0, unrelated_vertical_distance);
402 402
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_SESSION_ONLY_BUTTON)); 446 l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_SESSION_ONLY_BUTTON));
447 447
448 // Create the view that holds all the controls together. This will be the 448 // Create the view that holds all the controls together. This will be the
449 // pane added to the tabbed pane. 449 // pane added to the tabbed pane.
450 using views::GridLayout; 450 using views::GridLayout;
451 451
452 views::View* pane = new views::View(); 452 views::View* pane = new views::View();
453 GridLayout* layout = GridLayout::CreatePanel(pane); 453 GridLayout* layout = GridLayout::CreatePanel(pane);
454 int unrelated_vertical_distance = 454 int unrelated_vertical_distance =
455 ChromeLayoutProvider::Get()->GetDistanceMetric( 455 ChromeLayoutProvider::Get()->GetDistanceMetric(
456 DISTANCE_UNRELATED_CONTROL_VERTICAL); 456 views::DISTANCE_UNRELATED_CONTROL_VERTICAL);
457 457
458 const int single_column_layout_id = 0; 458 const int single_column_layout_id = 0;
459 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id); 459 views::ColumnSet* column_set = layout->AddColumnSet(single_column_layout_id);
460 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 460 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
461 GridLayout::USE_PREF, 0, 0); 461 GridLayout::USE_PREF, 0, 0);
462 462
463 layout->StartRow(0, single_column_layout_id); 463 layout->StartRow(0, single_column_layout_id);
464 layout->AddView(blocked_label_, 1, 1, GridLayout::FILL, GridLayout::FILL); 464 layout->AddView(blocked_label_, 1, 1, GridLayout::FILL, GridLayout::FILL);
465 layout->AddPaddingRow(0, unrelated_vertical_distance); 465 layout->AddPaddingRow(0, unrelated_vertical_distance);
466 466
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 /////////////////////////////////////////////////////////////////////////////// 550 ///////////////////////////////////////////////////////////////////////////////
551 // CollectedCookiesViews, content::NotificationObserver implementation: 551 // CollectedCookiesViews, content::NotificationObserver implementation:
552 552
553 void CollectedCookiesViews::Observe( 553 void CollectedCookiesViews::Observe(
554 int type, 554 int type,
555 const content::NotificationSource& source, 555 const content::NotificationSource& source,
556 const content::NotificationDetails& details) { 556 const content::NotificationDetails& details) {
557 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); 557 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type);
558 GetWidget()->Close(); 558 GetWidget()->Close();
559 } 559 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/save_card_bubble_views.cc ('k') | chrome/browser/ui/views/content_setting_bubble_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698