OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTROLL
ER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 virtual bool ShowContextMenu(views::MenuItemView* source, | 51 virtual bool ShowContextMenu(views::MenuItemView* source, |
52 int id, | 52 int id, |
53 const gfx::Point& p, | 53 const gfx::Point& p, |
54 bool is_mouse_gesture); | 54 bool is_mouse_gesture); |
55 virtual void DropMenuClosed(views::MenuItemView* menu); | 55 virtual void DropMenuClosed(views::MenuItemView* menu); |
56 // These drag functions offer support for dragging icons into the overflow | 56 // These drag functions offer support for dragging icons into the overflow |
57 // menu. | 57 // menu. |
58 virtual bool GetDropFormats( | 58 virtual bool GetDropFormats( |
59 views::MenuItemView* menu, | 59 views::MenuItemView* menu, |
60 int* formats, | 60 int* formats, |
61 std::set<OSExchangeData::CustomFormat>* custom_formats); | 61 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); |
62 virtual bool AreDropTypesRequired(views::MenuItemView* menu); | 62 virtual bool AreDropTypesRequired(views::MenuItemView* menu); |
63 virtual bool CanDrop(views::MenuItemView* menu, const OSExchangeData& data); | 63 virtual bool CanDrop(views::MenuItemView* menu, const ui::OSExchangeData& data
); |
64 virtual int GetDropOperation(views::MenuItemView* item, | 64 virtual int GetDropOperation(views::MenuItemView* item, |
65 const views::DropTargetEvent& event, | 65 const views::DropTargetEvent& event, |
66 DropPosition* position); | 66 DropPosition* position); |
67 virtual int OnPerformDrop(views::MenuItemView* menu, | 67 virtual int OnPerformDrop(views::MenuItemView* menu, |
68 DropPosition position, | 68 DropPosition position, |
69 const views::DropTargetEvent& event); | 69 const views::DropTargetEvent& event); |
70 // These three drag functions offer support for dragging icons out of the | 70 // These three drag functions offer support for dragging icons out of the |
71 // overflow menu. | 71 // overflow menu. |
72 virtual bool CanDrag(views::MenuItemView* menu); | 72 virtual bool CanDrag(views::MenuItemView* menu); |
73 virtual void WriteDragData(views::MenuItemView* sender, OSExchangeData* data); | 73 virtual void WriteDragData(views::MenuItemView* sender, ui::OSExchangeData* da
ta); |
74 virtual int GetDragOperations(views::MenuItemView* sender); | 74 virtual int GetDragOperations(views::MenuItemView* sender); |
75 | 75 |
76 private: | 76 private: |
77 // This class manages its own lifetime. | 77 // This class manages its own lifetime. |
78 virtual ~BrowserActionOverflowMenuController(); | 78 virtual ~BrowserActionOverflowMenuController(); |
79 | 79 |
80 // Converts a menu item |id| into a BrowserActionView by adding the |id| value | 80 // Converts a menu item |id| into a BrowserActionView by adding the |id| value |
81 // to the number of visible views (according to the container owner). If | 81 // to the number of visible views (according to the container owner). If |
82 // |index| is specified, it will point to the absolute index of the view. | 82 // |index| is specified, it will point to the absolute index of the view. |
83 BrowserActionView* ViewForId(int id, size_t* index); | 83 BrowserActionView* ViewForId(int id, size_t* index); |
(...skipping 24 matching lines...) Expand all Loading... |
108 // The browser action context menu and model. | 108 // The browser action context menu and model. |
109 scoped_refptr<ExtensionContextMenuModel> context_menu_contents_; | 109 scoped_refptr<ExtensionContextMenuModel> context_menu_contents_; |
110 scoped_ptr<views::Menu2> context_menu_menu_; | 110 scoped_ptr<views::Menu2> context_menu_menu_; |
111 | 111 |
112 friend class DeleteTask<BrowserActionOverflowMenuController>; | 112 friend class DeleteTask<BrowserActionOverflowMenuController>; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); | 114 DISALLOW_COPY_AND_ASSIGN(BrowserActionOverflowMenuController); |
115 }; | 115 }; |
116 | 116 |
117 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR
OLLER_H_ | 117 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_BROWSER_ACTION_OVERFLOW_MENU_CONTR
OLLER_H_ |
OLD | NEW |