OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/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" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 if (source == language_menu_button_) { | 192 if (source == language_menu_button_) { |
193 menu_model = &languages_menu_model_; | 193 menu_model = &languages_menu_model_; |
194 } else { | 194 } else { |
195 DCHECK_EQ(options_menu_button_, source); | 195 DCHECK_EQ(options_menu_button_, source); |
196 menu_model = &options_menu_model_; | 196 menu_model = &options_menu_model_; |
197 } | 197 } |
198 | 198 |
199 views::MenuModelAdapter menu_model_adapter(menu_model); | 199 views::MenuModelAdapter menu_model_adapter(menu_model); |
200 views::MenuItemView menu(&menu_model_adapter); | 200 views::MenuItemView menu(&menu_model_adapter); |
201 menu_model_adapter.BuildMenu(&menu); | 201 menu_model_adapter.BuildMenu(&menu); |
202 menu.RunMenuAt(source->GetWindow()->GetNativeWindow(), NULL, | 202 menu.RunMenuAt(source->GetWidget()->GetNativeWindow(), NULL, |
203 gfx::Rect(pt, gfx::Size()), views::MenuItemView::TOPRIGHT, true); | 203 gfx::Rect(pt, gfx::Size()), views::MenuItemView::TOPRIGHT, true); |
204 } | 204 } |
OLD | NEW |