Home | History | Annotate | Download | only in views
      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_PROFILE_MENU_MODEL_H_
      6 #define CHROME_BROWSER_UI_VIEWS_PROFILE_MENU_MODEL_H_
      7 #pragma once
      8 
      9 #include "ui/base/models/simple_menu_model.h"
     10 #include "ui/gfx/point.h"
     11 
     12 namespace ui {
     13 class Accelerator;
     14 }
     15 
     16 namespace views {
     17 class Menu2;
     18 
     19 // ProfileMenuModel
     20 //
     21 // Menu for the multi-profile button displayed on the browser frame when the
     22 // user is in a multi-profile-enabled account. Stub for now. TODO(mirandac):
     23 // enable and fill in as part of multi-profile work.
     24 
     25 class ProfileMenuModel : public ui::SimpleMenuModel,
     26                          public ui::SimpleMenuModel::Delegate {
     27  public:
     28   ProfileMenuModel();
     29   virtual ~ProfileMenuModel();
     30 
     31   void RunMenuAt(const gfx::Point& point);
     32 
     33   // ui::SimpleMenuModel::Delegate implementation
     34   virtual bool IsCommandIdChecked(int command_id) const;
     35   virtual bool IsCommandIdEnabled(int command_id) const;
     36   virtual bool GetAcceleratorForCommandId(int command_id,
     37                                           ui::Accelerator* accelerator);
     38   virtual void ExecuteCommand(int command_id);
     39 
     40  private:
     41   scoped_ptr<views::Menu2> menu_;
     42 
     43   DISALLOW_COPY_AND_ASSIGN(ProfileMenuModel);
     44 };
     45 
     46 }  // namespace views
     47 
     48 #endif  // CHROME_BROWSER_UI_VIEWS_PROFILE_MENU_MODEL_H_
     49 
     50 
     51