OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <map> |
| 10 #include <utility> |
| 11 |
| 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "ui/base/models/menu_model.h" |
| 15 #include "views/controls/menu/menu_model_adapter.h" |
| 16 |
| 17 class Profile; |
| 18 |
| 19 class AvatarMenu : public base::RefCounted<AvatarMenu>, |
| 20 public views::MenuModelAdapter { |
| 21 public: |
| 22 AvatarMenu(ui::MenuModel* model, Profile* profile); |
| 23 |
| 24 // Shows the menu relative to the specified view. |
| 25 void RunMenu(views::MenuButton* host); |
| 26 |
| 27 private: |
| 28 // The views menu. |
| 29 scoped_ptr<views::MenuItemView> root_; |
| 30 |
| 31 // Profile the menu is being shown for. |
| 32 Profile* profile_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_H_ |
OLD | NEW |