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/profile_menu_button.h" | 5 #include "chrome/browser/ui/views/profile_menu_button.h" |
6 | 6 |
7 #include "chrome/browser/ui/profile_menu_model.h" | 7 #include "chrome/browser/ui/profile_menu_model.h" |
8 #include "ui/base/text/text_elider.h" | 8 #include "ui/base/text/text_elider.h" |
9 #include "ui/gfx/color_utils.h" | 9 #include "ui/gfx/color_utils.h" |
10 #include "views/controls/button/button.h" | 10 #include "views/controls/button/button.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 views::MenuModelAdapter menu_model_adapter(profile_menu_model_.get()); | 53 views::MenuModelAdapter menu_model_adapter(profile_menu_model_.get()); |
54 views::MenuItemView menu(&menu_model_adapter); | 54 views::MenuItemView menu(&menu_model_adapter); |
55 menu_model_adapter.BuildMenu(&menu); | 55 menu_model_adapter.BuildMenu(&menu); |
56 | 56 |
57 gfx::Point menu_point(pt.x(), pt.y() + kMenuDisplayOffset); | 57 gfx::Point menu_point(pt.x(), pt.y() + kMenuDisplayOffset); |
58 menu.RunMenuAt(source->GetWidget()->GetNativeWindow(), NULL, | 58 menu.RunMenuAt(source->GetWidget()->GetNativeWindow(), NULL, |
59 gfx::Rect(pt, gfx::Size(0, 0)), | 59 gfx::Rect(pt, gfx::Size(0, 0)), |
60 views::MenuItemView::TOPRIGHT, | 60 views::MenuItemView::TOPRIGHT, |
61 true); | 61 true); |
62 } | 62 } |
OLD | NEW |