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/infobars/before_translate_infobar.h" | 5 #include "chrome/browser/ui/views/infobars/before_translate_infobar.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/translate/translate_infobar_delegate.h" | 8 #include "chrome/browser/translate/translate_infobar_delegate.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
11 #include "ui/views/controls/button/label_button.h" | 11 #include "ui/views/controls/button/label_button.h" |
12 #include "ui/views/controls/button/menu_button.h" | 12 #include "ui/views/controls/button/menu_button.h" |
13 #include "ui/views/controls/label.h" | 13 #include "ui/views/controls/label.h" |
14 #include "ui/views/controls/menu/menu_item_view.h" | 14 #include "ui/views/controls/menu/menu_item_view.h" |
15 | 15 |
16 BeforeTranslateInfoBar::BeforeTranslateInfoBar( | 16 BeforeTranslateInfoBar::BeforeTranslateInfoBar( |
17 InfoBarService* owner, | 17 InfoBarService* owner, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 return; // We're closing; don't call anything, it might access the owner. | 187 return; // We're closing; don't call anything, it might access the owner. |
188 if (source == language_menu_button_) { | 188 if (source == language_menu_button_) { |
189 RunMenuAt(language_menu_model_.get(), language_menu_button_, | 189 RunMenuAt(language_menu_model_.get(), language_menu_button_, |
190 views::MenuItemView::TOPLEFT); | 190 views::MenuItemView::TOPLEFT); |
191 } else { | 191 } else { |
192 DCHECK_EQ(options_menu_button_, source); | 192 DCHECK_EQ(options_menu_button_, source); |
193 RunMenuAt(&options_menu_model_, options_menu_button_, | 193 RunMenuAt(&options_menu_model_, options_menu_button_, |
194 views::MenuItemView::TOPRIGHT); | 194 views::MenuItemView::TOPRIGHT); |
195 } | 195 } |
196 } | 196 } |
OLD | NEW |