OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_VIEWS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/gfx/native_widget_types.h" | 10 #include "base/gfx/native_widget_types.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Returns the context menu, or NULL if the context menu isn't showing. | 65 // Returns the context menu, or NULL if the context menu isn't showing. |
66 views::MenuItemView* context_menu() const { | 66 views::MenuItemView* context_menu() const { |
67 return context_menu_.get() ? context_menu_->menu() : NULL; | 67 return context_menu_.get() ? context_menu_->menu() : NULL; |
68 } | 68 } |
69 | 69 |
70 void set_observer(Observer* observer) { observer_ = observer; } | 70 void set_observer(Observer* observer) { observer_ = observer; } |
71 | 71 |
72 // MenuDelegate methods. | 72 // MenuDelegate methods. |
73 virtual bool IsTriggerableEvent(const views::MouseEvent& e); | 73 virtual bool IsTriggerableEvent(const views::MouseEvent& e); |
74 virtual void ExecuteCommand(int id, int mouse_event_flags); | 74 virtual void ExecuteCommand(int id, int mouse_event_flags); |
| 75 virtual bool GetDropFormats( |
| 76 views::MenuItemView* menu, |
| 77 int* formats, |
| 78 std::set<OSExchangeData::CustomFormat>* custom_formats); |
| 79 virtual bool AreDropTypesRequired(views::MenuItemView* menu); |
75 virtual bool CanDrop(views::MenuItemView* menu, const OSExchangeData& data); | 80 virtual bool CanDrop(views::MenuItemView* menu, const OSExchangeData& data); |
76 virtual int GetDropOperation(views::MenuItemView* item, | 81 virtual int GetDropOperation(views::MenuItemView* item, |
77 const views::DropTargetEvent& event, | 82 const views::DropTargetEvent& event, |
78 DropPosition* position); | 83 DropPosition* position); |
79 virtual int OnPerformDrop(views::MenuItemView* menu, | 84 virtual int OnPerformDrop(views::MenuItemView* menu, |
80 DropPosition position, | 85 DropPosition position, |
81 const views::DropTargetEvent& event); | 86 const views::DropTargetEvent& event); |
82 virtual bool ShowContextMenu(views::MenuItemView* source, | 87 virtual bool ShowContextMenu(views::MenuItemView* source, |
83 int id, | 88 int id, |
84 int x, | 89 int x, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Is the menu being shown for a drop? | 147 // Is the menu being shown for a drop? |
143 bool for_drop_; | 148 bool for_drop_; |
144 | 149 |
145 // Should the other folder be shown? | 150 // Should the other folder be shown? |
146 bool show_other_folder_; | 151 bool show_other_folder_; |
147 | 152 |
148 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController); | 153 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController); |
149 }; | 154 }; |
150 | 155 |
151 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 156 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
OLD | NEW |