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

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

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + review comments Created 6 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 | 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"
9 #include "chrome/browser/translate/translate_infobar_delegate.h"
10 #include "chrome/browser/ui/views/infobars/translate_language_menu_model.h" 8 #include "chrome/browser/ui/views/infobars/translate_language_menu_model.h"
9 #include "components/translate/core/browser/options_menu_model.h"
10 #include "components/translate/core/browser/translate_infobar_delegate.h"
11 #include "grit/components_strings.h" 11 #include "grit/components_strings.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/views/controls/button/label_button.h" 13 #include "ui/views/controls/button/label_button.h"
14 #include "ui/views/controls/button/menu_button.h" 14 #include "ui/views/controls/button/menu_button.h"
15 #include "ui/views/controls/label.h" 15 #include "ui/views/controls/label.h"
16 16
17 AfterTranslateInfoBar::AfterTranslateInfoBar( 17 AfterTranslateInfoBar::AfterTranslateInfoBar(
18 scoped_ptr<TranslateInfoBarDelegate> delegate) 18 scoped_ptr<TranslateInfoBarDelegate> delegate)
19 : TranslateInfoBarBase(delegate.Pass()), 19 : TranslateInfoBarBase(delegate.Pass()),
20 label_1_(NULL), 20 label_1_(NULL),
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (!autodetermined_source_language_) { 193 if (!autodetermined_source_language_) {
194 width += 194 width +=
195 (label_2_->text().empty() ? 195 (label_2_->text().empty() ?
196 kButtonButtonSpacing : kButtonInLabelSpacing) + 196 kButtonButtonSpacing : kButtonInLabelSpacing) +
197 second_button->width() + 197 second_button->width() +
198 (label_3_->text().empty() ? 0 : kButtonInLabelSpacing); 198 (label_3_->text().empty() ? 0 : kButtonInLabelSpacing);
199 } 199 }
200 return width + kEndOfLabelSpacing + revert_button_->width() + 200 return width + kEndOfLabelSpacing + revert_button_->width() +
201 kEndOfLabelSpacing + options_menu_button_->width(); 201 kEndOfLabelSpacing + options_menu_button_->width();
202 } 202 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698