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

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

Issue 141523005: Combobox: Rename styles to STYLE_NORMAL and STYLE_ACTION and modify behaviors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 views::Label* message_label = new views::Label( 469 views::Label* message_label = new views::Label(
470 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_BEFORE_TRANSLATE)); 470 l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_BEFORE_TRANSLATE));
471 471
472 base::string16 original_language_name = 472 base::string16 original_language_name =
473 model_->GetLanguageNameAt(model_->GetOriginalLanguageIndex()); 473 model_->GetLanguageNameAt(model_->GetOriginalLanguageIndex());
474 denial_combobox_ = new views::Combobox( 474 denial_combobox_ = new views::Combobox(
475 new TranslateDenialComboboxModel(original_language_name)); 475 new TranslateDenialComboboxModel(original_language_name));
476 denial_combobox_->set_id(COMBOBOX_ID_DENIAL); 476 denial_combobox_->set_id(COMBOBOX_ID_DENIAL);
477 denial_combobox_->set_listener(this); 477 denial_combobox_->set_listener(this);
478 denial_combobox_->SetStyle(views::Combobox::STYLE_NOTIFY_ON_CLICK); 478 denial_combobox_->SetStyle(views::Combobox::STYLE_NOTIFY_ON_CLICK);
479 denial_combobox_->SetMenuItemRaisesClickEvent(true);
479 480
480 views::View* view = new views::View(); 481 views::View* view = new views::View();
481 views::GridLayout* layout = new views::GridLayout(view); 482 views::GridLayout* layout = new views::GridLayout(view);
482 view->SetLayoutManager(layout); 483 view->SetLayoutManager(layout);
483 484
484 using views::GridLayout; 485 using views::GridLayout;
485 486
486 enum { 487 enum {
487 COLUMN_SET_ID_MESSAGE, 488 COLUMN_SET_ID_MESSAGE,
488 COLUMN_SET_ID_CONTENT, 489 COLUMN_SET_ID_CONTENT,
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 model_->ShouldAlwaysTranslate()); 791 model_->ShouldAlwaysTranslate());
791 } 792 }
792 793
793 base::string16 label; 794 base::string16 label;
794 if (model_->IsPageTranslatedInCurrentLanguages()) 795 if (model_->IsPageTranslatedInCurrentLanguages())
795 label = l10n_util::GetStringUTF16(IDS_DONE); 796 label = l10n_util::GetStringUTF16(IDS_DONE);
796 else 797 else
797 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT); 798 label = l10n_util::GetStringUTF16(IDS_TRANSLATE_BUBBLE_ACCEPT);
798 advanced_done_button_->SetText(label); 799 advanced_done_button_->SetText(label);
799 } 800 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/combobox/combobox.h » ('j') | ui/views/controls/combobox/combobox.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698