OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Sets the page navigator. | 70 // Sets the page navigator. |
71 void SetPageNavigator(content::PageNavigator* navigator); | 71 void SetPageNavigator(content::PageNavigator* navigator); |
72 | 72 |
73 void set_observer(BookmarkMenuControllerObserver* observer) { | 73 void set_observer(BookmarkMenuControllerObserver* observer) { |
74 observer_ = observer; | 74 observer_ = observer; |
75 } | 75 } |
76 | 76 |
77 // views::MenuDelegate: | 77 // views::MenuDelegate: |
78 virtual base::string16 GetTooltipText(int id, | 78 virtual base::string16 GetTooltipText(int id, |
79 const gfx::Point& p) const OVERRIDE; | 79 const gfx::Point& p) const override; |
80 virtual bool IsTriggerableEvent(views::MenuItemView* view, | 80 virtual bool IsTriggerableEvent(views::MenuItemView* view, |
81 const ui::Event& e) OVERRIDE; | 81 const ui::Event& e) override; |
82 virtual void ExecuteCommand(int id, int mouse_event_flags) OVERRIDE; | 82 virtual void ExecuteCommand(int id, int mouse_event_flags) override; |
83 virtual bool ShouldExecuteCommandWithoutClosingMenu( | 83 virtual bool ShouldExecuteCommandWithoutClosingMenu( |
84 int id, | 84 int id, |
85 const ui::Event& e) OVERRIDE; | 85 const ui::Event& e) override; |
86 virtual bool GetDropFormats( | 86 virtual bool GetDropFormats( |
87 views::MenuItemView* menu, | 87 views::MenuItemView* menu, |
88 int* formats, | 88 int* formats, |
89 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | 89 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) override; |
90 virtual bool AreDropTypesRequired(views::MenuItemView* menu) OVERRIDE; | 90 virtual bool AreDropTypesRequired(views::MenuItemView* menu) override; |
91 virtual bool CanDrop(views::MenuItemView* menu, | 91 virtual bool CanDrop(views::MenuItemView* menu, |
92 const ui::OSExchangeData& data) OVERRIDE; | 92 const ui::OSExchangeData& data) override; |
93 virtual int GetDropOperation(views::MenuItemView* item, | 93 virtual int GetDropOperation(views::MenuItemView* item, |
94 const ui::DropTargetEvent& event, | 94 const ui::DropTargetEvent& event, |
95 DropPosition* position) OVERRIDE; | 95 DropPosition* position) override; |
96 virtual int OnPerformDrop(views::MenuItemView* menu, | 96 virtual int OnPerformDrop(views::MenuItemView* menu, |
97 DropPosition position, | 97 DropPosition position, |
98 const ui::DropTargetEvent& event) OVERRIDE; | 98 const ui::DropTargetEvent& event) override; |
99 virtual bool ShowContextMenu(views::MenuItemView* source, | 99 virtual bool ShowContextMenu(views::MenuItemView* source, |
100 int id, | 100 int id, |
101 const gfx::Point& p, | 101 const gfx::Point& p, |
102 ui::MenuSourceType source_type) OVERRIDE; | 102 ui::MenuSourceType source_type) override; |
103 virtual void DropMenuClosed(views::MenuItemView* menu) OVERRIDE; | 103 virtual void DropMenuClosed(views::MenuItemView* menu) override; |
104 virtual bool CanDrag(views::MenuItemView* menu) OVERRIDE; | 104 virtual bool CanDrag(views::MenuItemView* menu) override; |
105 virtual void WriteDragData(views::MenuItemView* sender, | 105 virtual void WriteDragData(views::MenuItemView* sender, |
106 ui::OSExchangeData* data) OVERRIDE; | 106 ui::OSExchangeData* data) override; |
107 virtual int GetDragOperations(views::MenuItemView* sender) OVERRIDE; | 107 virtual int GetDragOperations(views::MenuItemView* sender) override; |
108 virtual views::MenuItemView* GetSiblingMenu( | 108 virtual views::MenuItemView* GetSiblingMenu( |
109 views::MenuItemView* menu, | 109 views::MenuItemView* menu, |
110 const gfx::Point& screen_point, | 110 const gfx::Point& screen_point, |
111 views::MenuAnchorPosition* anchor, | 111 views::MenuAnchorPosition* anchor, |
112 bool* has_mnemonics, | 112 bool* has_mnemonics, |
113 views::MenuButton** button) OVERRIDE; | 113 views::MenuButton** button) override; |
114 virtual int GetMaxWidthForMenu(views::MenuItemView* view) OVERRIDE; | 114 virtual int GetMaxWidthForMenu(views::MenuItemView* view) override; |
115 | 115 |
116 // BaseBookmarkModelObserver: | 116 // BaseBookmarkModelObserver: |
117 virtual void BookmarkModelChanged() OVERRIDE; | 117 virtual void BookmarkModelChanged() override; |
118 | 118 |
119 private: | 119 private: |
120 // BookmarkMenuController deletes itself as necessary. | 120 // BookmarkMenuController deletes itself as necessary. |
121 virtual ~BookmarkMenuController(); | 121 virtual ~BookmarkMenuController(); |
122 | 122 |
123 scoped_ptr<views::MenuRunner> menu_runner_; | 123 scoped_ptr<views::MenuRunner> menu_runner_; |
124 | 124 |
125 scoped_ptr<BookmarkMenuDelegate> menu_delegate_; | 125 scoped_ptr<BookmarkMenuDelegate> menu_delegate_; |
126 | 126 |
127 // The node we're showing the contents of. | 127 // The node we're showing the contents of. |
(...skipping 10 matching lines...) Expand all Loading... |
138 | 138 |
139 // The bookmark bar. This is only non-null if we're showing a menu item for a | 139 // The bookmark bar. This is only non-null if we're showing a menu item for a |
140 // folder on the bookmark bar and not for drop, or if the BookmarkBarView has | 140 // folder on the bookmark bar and not for drop, or if the BookmarkBarView has |
141 // been destroyed before the menu. | 141 // been destroyed before the menu. |
142 BookmarkBarView* bookmark_bar_; | 142 BookmarkBarView* bookmark_bar_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController); | 144 DISALLOW_COPY_AND_ASSIGN(BookmarkMenuController); |
145 }; | 145 }; |
146 | 146 |
147 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ | 147 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_MENU_CONTROLLER_VIEWS_H_ |
OLD | NEW |