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

Unified Diff: chrome/browser/chromeos/login/language_switch_menu.cc

Issue 3533001: Add SetMinimumWidth to Menu2 for chromeos. Removed LanguageSwitchModel::GetFirstLevelMenuWidth (Closed)
Patch Set: updated comment Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/language_switch_menu.cc
diff --git a/chrome/browser/chromeos/login/language_switch_menu.cc b/chrome/browser/chromeos/login/language_switch_menu.cc
index dc94c8403f2e86eb9ab63f50bb6ba2196a737c2f..5f5d8c6cbbb3267184fd88022a3c6fe9921b1f1d 100644
--- a/chrome/browser/chromeos/login/language_switch_menu.cc
+++ b/chrome/browser/chromeos/login/language_switch_menu.cc
@@ -70,18 +70,9 @@ std::wstring LanguageSwitchMenu::GetCurrentLocaleName() const {
language_list_->GetIndexFromLocale(locale));
};
-// Currently, views::Menu is implemented directly with the Gtk
-// widgets. So we use native gtk callbacks to get its future size.
-int LanguageSwitchMenu::GetFirstLevelMenuWidth() const {
- DCHECK(menu_ != NULL);
- GtkRequisition box_size;
- gtk_widget_size_request(menu_->GetNativeMenu(), &box_size);
- return box_size.width;
-}
-
void LanguageSwitchMenu::SetFirstLevelMenuWidth(int width) {
DCHECK(menu_ != NULL);
- gtk_widget_set_size_request(menu_->GetNativeMenu(), width, -1);
+ menu_->SetMinimumWidth(width);
}
// static
« no previous file with comments | « chrome/browser/chromeos/login/language_switch_menu.h ('k') | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698