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/avatar_menu_button.h" | 5 #include "chrome/browser/ui/views/avatar_menu_button.h" |
6 | 6 |
7 #include "ui/gfx/canvas_skia.h" | 7 #include "ui/gfx/canvas_skia.h" |
8 #include "views/controls/menu/menu_model_adapter.h" | 8 #include "views/controls/menu/menu_model_adapter.h" |
9 #include "views/window/window.h" | 9 #include "views/window/window.h" |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 views::MenuModelAdapter menu_model_adapter(menu_model_.get()); | 62 views::MenuModelAdapter menu_model_adapter(menu_model_.get()); |
63 views::MenuItemView menu(&menu_model_adapter); | 63 views::MenuItemView menu(&menu_model_adapter); |
64 menu_model_adapter.BuildMenu(&menu); | 64 menu_model_adapter.BuildMenu(&menu); |
65 | 65 |
66 gfx::Point menu_point(pt.x(), pt.y() + kMenuDisplayOffset); | 66 gfx::Point menu_point(pt.x(), pt.y() + kMenuDisplayOffset); |
67 menu.RunMenuAt(source->GetWindow()->GetNativeWindow(), NULL, | 67 menu.RunMenuAt(source->GetWindow()->GetNativeWindow(), NULL, |
68 gfx::Rect(pt, gfx::Size(0, 0)), | 68 gfx::Rect(pt, gfx::Size(0, 0)), |
69 views::MenuItemView::TOPRIGHT, | 69 views::MenuItemView::TOPRIGHT, |
70 true); | 70 true); |
71 } | 71 } |
OLD | NEW |