| 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 virtual ~AvatarMenu(); | |
| 24 | |
| 25 // Shows the menu relative to the specified view. | |
| 26 void RunMenu(views::MenuButton* host); | |
| 27 | |
| 28 private: | |
| 29 // The views menu. | |
| 30 scoped_ptr<views::MenuItemView> root_; | |
| 31 | |
| 32 // Profile the menu is being shown for. | |
| 33 Profile* profile_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_H_ | |
| OLD | NEW |