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/content_setting_bubble_contents.h" | 5 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 double_column_set->AddColumn(GridLayout::TRAILING, GridLayout::CENTER, 1, | 399 double_column_set->AddColumn(GridLayout::TRAILING, GridLayout::CENTER, 1, |
400 GridLayout::USE_PREF, 0, 0); | 400 GridLayout::USE_PREF, 0, 0); |
401 double_column_set->AddPaddingColumn( | 401 double_column_set->AddPaddingColumn( |
402 0, views::kRelatedControlSmallVerticalSpacing); | 402 0, views::kRelatedControlSmallVerticalSpacing); |
403 double_column_set->AddColumn(GridLayout::TRAILING, GridLayout::CENTER, 0, | 403 double_column_set->AddColumn(GridLayout::TRAILING, GridLayout::CENTER, 0, |
404 GridLayout::USE_PREF, 0, 0); | 404 GridLayout::USE_PREF, 0, 0); |
405 | 405 |
406 const int kSingleColumnRightSetId = 1; | 406 const int kSingleColumnRightSetId = 1; |
407 views::ColumnSet* right_column_set = | 407 views::ColumnSet* right_column_set = |
408 layout->AddColumnSet(kSingleColumnRightSetId); | 408 layout->AddColumnSet(kSingleColumnRightSetId); |
409 right_column_set->AddColumn(GridLayout::TRAILING, GridLayout::FILL, 1, | 409 right_column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, |
410 GridLayout::USE_PREF, 0, 0); | 410 GridLayout::USE_PREF, 0, 0); |
411 | 411 |
412 never_button_ = new views::LabelButton( | 412 never_button_ = new views::LabelButton( |
413 this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON)); | 413 this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_BLACKLIST_BUTTON)); |
414 never_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); | 414 never_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); |
415 save_button_ = new views::LabelButton( | 415 save_button_ = new views::LabelButton( |
416 this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SAVE_BUTTON)); | 416 this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SAVE_BUTTON)); |
417 save_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); | 417 save_button_->SetStyle(views::Button::STYLE_NATIVE_TEXTBUTTON); |
418 manage_link_ = new views::Link(UTF8ToUTF16(bubble_content.manage_link)); | 418 manage_link_ = new views::Link(UTF8ToUTF16(bubble_content.manage_link)); |
419 manage_link_->set_listener(this); | 419 manage_link_->set_listener(this); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 int width = button->GetPreferredSize().width(); | 533 int width = button->GetPreferredSize().width(); |
534 for (int i = 0; i < menu_model->GetItemCount(); ++i) { | 534 for (int i = 0; i < menu_model->GetItemCount(); ++i) { |
535 button->SetText(menu_model->GetLabelAt(i)); | 535 button->SetText(menu_model->GetLabelAt(i)); |
536 width = std::max(width, button->GetPreferredSize().width()); | 536 width = std::max(width, button->GetPreferredSize().width()); |
537 } | 537 } |
538 | 538 |
539 // Recover the title for the menu button. | 539 // Recover the title for the menu button. |
540 button->SetText(title); | 540 button->SetText(title); |
541 return width; | 541 return width; |
542 } | 542 } |
OLD | NEW |