- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / gtk / password_menu_model.h
1 // Copyright 2013 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_GTK_PASSWORD_MENU_MODEL_H_
6 #define CHROME_BROWSER_UI_GTK_PASSWORD_MENU_MODEL_H_
7
8 #include <map>
9 #include <string>
10
11 #include "ui/base/models/simple_menu_model.h"
12
13 class ContentSettingBubbleModel;
14 class ContentSettingBubbleGtk;
15
16 // A menu model that builds the contents of the password menu in the content
17 // setting bubble.
18 class PasswordMenuModel : public ui::SimpleMenuModel,
19                           public ui::SimpleMenuModel::Delegate {
20  public:
21   PasswordMenuModel(
22       ContentSettingBubbleModel* bubble_model,
23       ContentSettingBubbleGtk* bubble_contents);
24   virtual ~PasswordMenuModel();
25
26   // ui::SimpleMenuModel::Delegate:
27   virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
28   virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
29   virtual bool GetAcceleratorForCommandId(
30       int command_id,
31       ui::Accelerator* accelerator) OVERRIDE;
32   virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
33
34  private:
35   enum CommandID {
36     COMMAND_ID_NOPE,
37     COMMAND_ID_NEVER_FOR_THIS_SITE,
38   };
39
40   ContentSettingBubbleModel* media_bubble_model_;   // Weak.
41   ContentSettingBubbleGtk* media_bubble_contents_;  // Weak.
42
43   DISALLOW_COPY_AND_ASSIGN(PasswordMenuModel);
44 };
45
46 #endif  // CHROME_BROWSER_UI_GTK_PASSWORD_MENU_MODEL_H_