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

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

Issue 7054052: Move more from Window onto Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/after_translate_infobar.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698