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

Side by Side Diff: chrome/browser/ui/views/infobars/after_translate_infobar.cc

Issue 114883004: Add base:: namespace to straggling string16s left in chrome/browser/ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: found more Created 7 years 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 | Annotate | Revision Log
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/infobars/after_translate_infobar.h" 5 #include "chrome/browser/ui/views/infobars/after_translate_infobar.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/translate/options_menu_model.h" 8 #include "chrome/browser/translate/options_menu_model.h"
9 #include "chrome/browser/translate/translate_infobar_delegate.h" 9 #include "chrome/browser/translate/translate_infobar_delegate.h"
10 #include "chrome/browser/ui/views/infobars/translate_language_menu_model.h" 10 #include "chrome/browser/ui/views/infobars/translate_language_menu_model.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 AddChildView(first_button); 111 AddChildView(first_button);
112 112
113 label_2_ = CreateLabel(strings[1]); 113 label_2_ = CreateLabel(strings[1]);
114 AddChildView(label_2_); 114 AddChildView(label_2_);
115 115
116 // These views may not always be shown, but adding them unconditionally 116 // These views may not always be shown, but adding them unconditionally
117 // prevents leaks and reduces NULL-checking elsewhere. 117 // prevents leaks and reduces NULL-checking elsewhere.
118 AddChildView(second_button); 118 AddChildView(second_button);
119 if (autodetermined_source_language_) 119 if (autodetermined_source_language_)
120 second_button->SetVisible(false); 120 second_button->SetVisible(false);
121 label_3_ = 121 label_3_ = CreateLabel(autodetermined_source_language_ ? base::string16() :
122 CreateLabel(autodetermined_source_language_ ? string16() : strings[2]); 122 strings[2]);
123 AddChildView(label_3_); 123 AddChildView(label_3_);
124 124
125 revert_button_ = CreateLabelButton(this, 125 revert_button_ = CreateLabelButton(this,
126 l10n_util::GetStringUTF16(IDS_TRANSLATE_INFOBAR_REVERT), false); 126 l10n_util::GetStringUTF16(IDS_TRANSLATE_INFOBAR_REVERT), false);
127 AddChildView(revert_button_); 127 AddChildView(revert_button_);
128 128
129 options_menu_button_ = CreateMenuButton( 129 options_menu_button_ = CreateMenuButton(
130 l10n_util::GetStringUTF16(IDS_TRANSLATE_INFOBAR_OPTIONS), this); 130 l10n_util::GetStringUTF16(IDS_TRANSLATE_INFOBAR_OPTIONS), this);
131 options_menu_model_.reset(new OptionsMenuModel(delegate)); 131 options_menu_model_.reset(new OptionsMenuModel(delegate));
132 AddChildView(options_menu_button_); 132 AddChildView(options_menu_button_);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 185
186 void AfterTranslateInfoBar::GetButtons( 186 void AfterTranslateInfoBar::GetButtons(
187 views::MenuButton** first_button, 187 views::MenuButton** first_button,
188 views::MenuButton** second_button) const { 188 views::MenuButton** second_button) const {
189 *first_button = original_language_menu_button_; 189 *first_button = original_language_menu_button_;
190 *second_button = target_language_menu_button_; 190 *second_button = target_language_menu_button_;
191 if (swapped_language_buttons_ || autodetermined_source_language_) 191 if (swapped_language_buttons_ || autodetermined_source_language_)
192 std::swap(*first_button, *second_button); 192 std::swap(*first_button, *second_button);
193 } 193 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_message_bubble_view.cc ('k') | chrome/browser/ui/views/toolbar/site_chip_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698