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

Side by Side Diff: chrome/browser/ui/views/translate/translate_bubble_view.cc

Issue 2855093002: Remove a new usage of LabelButton::SetStyle (in ChromeCleanerDialog). (Closed)
Patch Set: views:: Created 3 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/translate/translate_bubble_view.h" 5 #include "chrome/browser/ui/views/translate/translate_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 this, l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT)) 616 this, l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT))
617 : views::MdTextButton::CreateSecondaryUiButton( 617 : views::MdTextButton::CreateSecondaryUiButton(
618 this, l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT)); 618 this, l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT));
619 accept_button->set_id(BUTTON_ID_TRANSLATE); 619 accept_button->set_id(BUTTON_ID_TRANSLATE);
620 layout->AddView(accept_button); 620 layout->AddView(accept_button);
621 accept_button->SetIsDefault(true); 621 accept_button->SetIsDefault(true);
622 if (Use2016Q2UI()) { 622 if (Use2016Q2UI()) {
623 denial_menu_button_ = new views::MenuButton( 623 denial_menu_button_ = new views::MenuButton(
624 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_OPTIONS_MENU_BUTTON), 624 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_OPTIONS_MENU_BUTTON),
625 this, true); 625 this, true);
626 denial_menu_button_->SetStyle(views::Button::STYLE_BUTTON); 626 denial_menu_button_->SetStyleDeprecated(views::Button::STYLE_BUTTON);
627 layout->AddView(denial_menu_button_); 627 layout->AddView(denial_menu_button_);
628 } else { 628 } else {
629 std::vector<base::string16> items( 629 std::vector<base::string16> items(
630 static_cast<size_t>(DenialComboboxIndex::MENU_SIZE)); 630 static_cast<size_t>(DenialComboboxIndex::MENU_SIZE));
631 items[static_cast<size_t>(DenialComboboxIndex::DONT_TRANSLATE)] = 631 items[static_cast<size_t>(DenialComboboxIndex::DONT_TRANSLATE)] =
632 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_DENY); 632 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_DENY);
633 items[static_cast<size_t>(DenialComboboxIndex::NEVER_TRANSLATE_LANGUAGE)] = 633 items[static_cast<size_t>(DenialComboboxIndex::NEVER_TRANSLATE_LANGUAGE)] =
634 l10n_util::GetStringFUTF16(IDS_TRANSLATE_BUBBLE_NEVER_TRANSLATE_LANG, 634 l10n_util::GetStringFUTF16(IDS_TRANSLATE_BUBBLE_NEVER_TRANSLATE_LANG,
635 original_language_name); 635 original_language_name);
636 items[static_cast<size_t>(DenialComboboxIndex::NEVER_TRANSLATE_SITE)] = 636 items[static_cast<size_t>(DenialComboboxIndex::NEVER_TRANSLATE_SITE)] =
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 base::string16 label; 946 base::string16 label;
947 if (model_->IsPageTranslatedInCurrentLanguages()) 947 if (model_->IsPageTranslatedInCurrentLanguages())
948 label = l10n_util::GetStringUTF16(IDS_DONE); 948 label = l10n_util::GetStringUTF16(IDS_DONE);
949 else 949 else
950 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); 950 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT);
951 advanced_done_button_->SetText(label); 951 advanced_done_button_->SetText(label);
952 advanced_done_button_->SizeToPreferredSize(); 952 advanced_done_button_->SizeToPreferredSize();
953 if (advanced_view_) 953 if (advanced_view_)
954 advanced_view_->Layout(); 954 advanced_view_->Layout();
955 } 955 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_cleaner_dialog.cc ('k') | ui/views/controls/button/blue_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698