OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ |
6 #define CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/bookmarks/bookmark_bar_model.h" | |
9 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 8 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/common/slide_animation.h" | 10 #include "chrome/common/slide_animation.h" |
11 #include "chrome/views/label.h" | 11 #include "chrome/views/label.h" |
12 #include "chrome/views/menu.h" | 12 #include "chrome/views/menu.h" |
13 #include "chrome/views/menu_button.h" | 13 #include "chrome/views/menu_button.h" |
14 #include "chrome/views/view.h" | 14 #include "chrome/views/view.h" |
15 #include "chrome/views/view_menu_delegate.h" | 15 #include "chrome/views/view_menu_delegate.h" |
16 | 16 |
17 class Browser; | 17 class Browser; |
18 class PageNavigator; | 18 class PageNavigator; |
19 class PrefService; | 19 class PrefService; |
20 | 20 |
21 namespace { | 21 namespace { |
22 class MenuRunner; | 22 class MenuRunner; |
23 class ButtonSeparatorView; | 23 class ButtonSeparatorView; |
24 struct DropInfo; | 24 struct DropInfo; |
25 } | 25 } |
26 | 26 |
27 namespace ChromeViews { | 27 namespace ChromeViews { |
28 class MenuItemView; | 28 class MenuItemView; |
29 } | 29 } |
30 | 30 |
31 // BookmarkBarView renders the BookmarkBarModel. Each starred entry | 31 // BookmarkBarView renders the BookmarkModel. Each starred entry on the |
32 // on the BookmarkBar is rendered as a MenuButton. An additional | 32 // BookmarkBar is rendered as a MenuButton. An additional MenuButton aligned to |
33 // MenuButton aligned to the right allows the user to quickly see | 33 // the right allows the user to quickly see recently starred entries. |
34 // recently starred entries. | |
35 // | 34 // |
36 // BookmarkBarView shows the bookmarks from a specific Profile. BookmarkBarView | 35 // BookmarkBarView shows the bookmarks from a specific Profile. BookmarkBarView |
37 // waits until the HistoryService for the profile has been loaded before | 36 // waits until the HistoryService for the profile has been loaded before |
38 // creating the BookmarkBarModel. | 37 // creating the BookmarkModel. |
39 class BookmarkBarView : public ChromeViews::View, | 38 class BookmarkBarView : public ChromeViews::View, |
40 public BookmarkBarModelObserver, | 39 public BookmarkModelObserver, |
41 public ChromeViews::ViewMenuDelegate, | 40 public ChromeViews::ViewMenuDelegate, |
42 public ChromeViews::BaseButton::ButtonListener, | 41 public ChromeViews::BaseButton::ButtonListener, |
43 public Menu::Delegate, | 42 public Menu::Delegate, |
44 public NotificationObserver, | 43 public NotificationObserver, |
45 public ChromeViews::ContextMenuController, | 44 public ChromeViews::ContextMenuController, |
46 public ChromeViews::DragController, | 45 public ChromeViews::DragController, |
47 public AnimationDelegate { | 46 public AnimationDelegate { |
48 friend class MenuRunner; | 47 friend class MenuRunner; |
49 friend class ShowFolderMenuTask; | 48 friend class ShowFolderMenuTask; |
50 | 49 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 112 |
114 // Returns the model change listener. | 113 // Returns the model change listener. |
115 ModelChangedListener* GetModelChangedListener() { | 114 ModelChangedListener* GetModelChangedListener() { |
116 return model_changed_listener_; | 115 return model_changed_listener_; |
117 } | 116 } |
118 | 117 |
119 // Returns the page navigator. | 118 // Returns the page navigator. |
120 PageNavigator* GetPageNavigator() { return page_navigator_; } | 119 PageNavigator* GetPageNavigator() { return page_navigator_; } |
121 | 120 |
122 // Returns the model. | 121 // Returns the model. |
123 BookmarkBarModel* GetModel() { return model_; } | 122 BookmarkModel* GetModel() { return model_; } |
124 | 123 |
125 // Toggles whether the bookmark bar is shown only on the new tab page or on | 124 // Toggles whether the bookmark bar is shown only on the new tab page or on |
126 // all tabs. | 125 // all tabs. |
127 void ToggleWhenVisible(); | 126 void ToggleWhenVisible(); |
128 | 127 |
129 // Returns true if the bookmarks bar preference is set to 'always show', we | 128 // Returns true if the bookmarks bar preference is set to 'always show', we |
130 // use this as a shorthand way of knowing what style of bar to draw (if the | 129 // use this as a shorthand way of knowing what style of bar to draw (if the |
131 // pref is set to false but we're painting, then we must be on the new tab | 130 // pref is set to false but we're painting, then we must be on the new tab |
132 // page). | 131 // page). |
133 bool IsAlwaysShown(); | 132 bool IsAlwaysShown(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 static const int kMaxButtonWidth; | 166 static const int kMaxButtonWidth; |
168 | 167 |
169 // If true we're running tests. This short circuits a couple of animations. | 168 // If true we're running tests. This short circuits a couple of animations. |
170 static bool testing_; | 169 static bool testing_; |
171 | 170 |
172 private: | 171 private: |
173 // Task that invokes ShowDropFolderForNode when run. ShowFolderDropMenuTask | 172 // Task that invokes ShowDropFolderForNode when run. ShowFolderDropMenuTask |
174 // deletes itself once run. | 173 // deletes itself once run. |
175 class ShowFolderDropMenuTask : public Task { | 174 class ShowFolderDropMenuTask : public Task { |
176 public: | 175 public: |
177 ShowFolderDropMenuTask(BookmarkBarView* view, | 176 ShowFolderDropMenuTask(BookmarkBarView* view, BookmarkNode* node) |
178 BookmarkBarNode* node) | |
179 : view_(view), | 177 : view_(view), |
180 node_(node) { | 178 node_(node) { |
181 } | 179 } |
182 | 180 |
183 void Cancel() { | 181 void Cancel() { |
184 view_->show_folder_drop_menu_task_ = NULL; | 182 view_->show_folder_drop_menu_task_ = NULL; |
185 view_ = NULL; | 183 view_ = NULL; |
186 } | 184 } |
187 | 185 |
188 virtual void Run() { | 186 virtual void Run() { |
189 if (view_) { | 187 if (view_) { |
190 view_->show_folder_drop_menu_task_ = NULL; | 188 view_->show_folder_drop_menu_task_ = NULL; |
191 view_->ShowDropFolderForNode(node_); | 189 view_->ShowDropFolderForNode(node_); |
192 } | 190 } |
193 // MessageLoop deletes us. | 191 // MessageLoop deletes us. |
194 } | 192 } |
195 | 193 |
196 private: | 194 private: |
197 BookmarkBarView* view_; | 195 BookmarkBarView* view_; |
198 BookmarkBarNode* node_; | 196 BookmarkNode* node_; |
199 | 197 |
200 DISALLOW_COPY_AND_ASSIGN(ShowFolderDropMenuTask); | 198 DISALLOW_COPY_AND_ASSIGN(ShowFolderDropMenuTask); |
201 }; | 199 }; |
202 | 200 |
203 // Creates recent bookmark button and when visible button as well as | 201 // Creates recent bookmark button and when visible button as well as |
204 // calculating the preferred height. | 202 // calculating the preferred height. |
205 void Init(); | 203 void Init(); |
206 | 204 |
207 // Creates the button showing the other bookmarked items. | 205 // Creates the button showing the other bookmarked items. |
208 ChromeViews::MenuButton* CreateOtherBookmarkedButton(); | 206 ChromeViews::MenuButton* CreateOtherBookmarkedButton(); |
209 | 207 |
210 // Creates the button used when not all bookmark buttons fit. | 208 // Creates the button used when not all bookmark buttons fit. |
211 ChromeViews::MenuButton* CreateOverflowButton(); | 209 ChromeViews::MenuButton* CreateOverflowButton(); |
212 | 210 |
213 // Returns the number of buttons corresponding to starred urls/groups. This | 211 // Returns the number of buttons corresponding to starred urls/groups. This |
214 // is equivalent to the number of children the bookmark bar node from the | 212 // is equivalent to the number of children the bookmark bar node from the |
215 // bookmark bar model has. | 213 // bookmark bar model has. |
216 int GetBookmarkButtonCount(); | 214 int GetBookmarkButtonCount(); |
217 | 215 |
218 // Invoked when the bookmark bar model has finished loading. Creates a button | 216 // Invoked when the bookmark bar model has finished loading. Creates a button |
219 // for each of the children of the root node from the model. | 217 // for each of the children of the root node from the model. |
220 virtual void Loaded(BookmarkBarModel* model); | 218 virtual void Loaded(BookmarkModel* model); |
221 | 219 |
222 // Invoked when the model is being deleted. | 220 // Invoked when the model is being deleted. |
223 virtual void BookmarkModelBeingDeleted(BookmarkBarModel* model); | 221 virtual void BookmarkModelBeingDeleted(BookmarkModel* model); |
224 | 222 |
225 // Invokes added followed by removed. | 223 // Invokes added followed by removed. |
226 virtual void BookmarkNodeMoved(BookmarkBarModel* model, | 224 virtual void BookmarkNodeMoved(BookmarkModel* model, |
227 BookmarkBarNode* old_parent, | 225 BookmarkNode* old_parent, |
228 int old_index, | 226 int old_index, |
229 BookmarkBarNode* new_parent, | 227 BookmarkNode* new_parent, |
230 int new_index); | 228 int new_index); |
231 | 229 |
232 // Notifies ModelChangeListener of change. | 230 // Notifies ModelChangeListener of change. |
233 // If the node was added to the root node, a button is created and added to | 231 // If the node was added to the root node, a button is created and added to |
234 // this bookmark bar view. | 232 // this bookmark bar view. |
235 virtual void BookmarkNodeAdded(BookmarkBarModel* model, | 233 virtual void BookmarkNodeAdded(BookmarkModel* model, |
236 BookmarkBarNode* parent, | 234 BookmarkNode* parent, |
237 int index); | 235 int index); |
238 | 236 |
239 // Implementation for BookmarkNodeAddedImpl. | 237 // Implementation for BookmarkNodeAddedImpl. |
240 void BookmarkNodeAddedImpl(BookmarkBarModel* model, | 238 void BookmarkNodeAddedImpl(BookmarkModel* model, |
241 BookmarkBarNode* parent, | 239 BookmarkNode* parent, |
242 int index); | 240 int index); |
243 | 241 |
244 // Notifies ModelChangeListener of change. | 242 // Notifies ModelChangeListener of change. |
245 // If the node was a child of the root node, the button corresponding to it | 243 // If the node was a child of the root node, the button corresponding to it |
246 // is removed. | 244 // is removed. |
247 virtual void BookmarkNodeRemoved(BookmarkBarModel* model, | 245 virtual void BookmarkNodeRemoved(BookmarkModel* model, |
248 BookmarkBarNode* parent, | 246 BookmarkNode* parent, |
249 int index); | 247 int index); |
250 | 248 |
251 // Implementation for BookmarkNodeRemoved. | 249 // Implementation for BookmarkNodeRemoved. |
252 void BookmarkNodeRemovedImpl(BookmarkBarModel* model, | 250 void BookmarkNodeRemovedImpl(BookmarkModel* model, |
253 BookmarkBarNode* parent, | 251 BookmarkNode* parent, |
254 int index); | 252 int index); |
255 | 253 |
256 // Notifies ModelChangedListener and invokes BookmarkNodeChangedImpl. | 254 // Notifies ModelChangedListener and invokes BookmarkNodeChangedImpl. |
257 virtual void BookmarkNodeChanged(BookmarkBarModel* model, | 255 virtual void BookmarkNodeChanged(BookmarkModel* model, |
258 BookmarkBarNode* node); | 256 BookmarkNode* node); |
259 | 257 |
260 // If the node is a child of the root node, the button is updated | 258 // If the node is a child of the root node, the button is updated |
261 // appropriately. | 259 // appropriately. |
262 void BookmarkNodeChangedImpl(BookmarkBarModel* model, BookmarkBarNode* node); | 260 void BookmarkNodeChangedImpl(BookmarkModel* model, BookmarkNode* node); |
263 | 261 |
264 // Invoked when the favicon is available. If the node is a child of the | 262 // Invoked when the favicon is available. If the node is a child of the |
265 // root node, the appropriate button is updated. If a menu is showing, the | 263 // root node, the appropriate button is updated. If a menu is showing, the |
266 // call is forwarded to the menu to allow for it to update the icon. | 264 // call is forwarded to the menu to allow for it to update the icon. |
267 virtual void BookmarkNodeFavIconLoaded(BookmarkBarModel* model, | 265 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, |
268 BookmarkBarNode* node); | 266 BookmarkNode* node); |
269 | 267 |
270 // DragController method. Determines the node representing sender and invokes | 268 // DragController method. Determines the node representing sender and invokes |
271 // WriteDragData to write the actual data. | 269 // WriteDragData to write the actual data. |
272 virtual void WriteDragData(ChromeViews::View* sender, | 270 virtual void WriteDragData(ChromeViews::View* sender, |
273 int press_x, | 271 int press_x, |
274 int press_y, | 272 int press_y, |
275 OSExchangeData* data); | 273 OSExchangeData* data); |
276 | 274 |
277 // Writes a BookmarkDragData for node to data. | 275 // Writes a BookmarkDragData for node to data. |
278 void WriteDragData(BookmarkBarNode* node, OSExchangeData* data); | 276 void WriteDragData(BookmarkNode* node, OSExchangeData* data); |
279 | 277 |
280 // Returns the drag operations for the specified button. | 278 // Returns the drag operations for the specified button. |
281 virtual int GetDragOperations(ChromeViews::View* sender, int x, int y); | 279 virtual int GetDragOperations(ChromeViews::View* sender, int x, int y); |
282 | 280 |
283 // ViewMenuDelegate method. 3 types of menus may be shown: | 281 // ViewMenuDelegate method. 3 types of menus may be shown: |
284 // . the menu allowing the user to choose when the bookmark bar is visible. | 282 // . the menu allowing the user to choose when the bookmark bar is visible. |
285 // . most recently bookmarked menu | 283 // . most recently bookmarked menu |
286 // . menu for star groups. | 284 // . menu for star groups. |
287 // The latter two are handled by a MenuRunner, which builds the appropriate | 285 // The latter two are handled by a MenuRunner, which builds the appropriate |
288 // menu. | 286 // menu. |
289 virtual void RunMenu(ChromeViews::View* view, const CPoint& pt, HWND hwnd); | 287 virtual void RunMenu(ChromeViews::View* view, const CPoint& pt, HWND hwnd); |
290 | 288 |
291 // Invoked when a star entry corresponding to a URL on the bookmark bar is | 289 // Invoked when a star entry corresponding to a URL on the bookmark bar is |
292 // pressed. Forwards to the PageNavigator to open the URL. | 290 // pressed. Forwards to the PageNavigator to open the URL. |
293 virtual void ButtonPressed(ChromeViews::BaseButton* sender); | 291 virtual void ButtonPressed(ChromeViews::BaseButton* sender); |
294 | 292 |
295 // Invoked for this View, one of the buttons or the 'other' button. Shows the | 293 // Invoked for this View, one of the buttons or the 'other' button. Shows the |
296 // appropriate context menu. | 294 // appropriate context menu. |
297 virtual void ShowContextMenu(ChromeViews::View* source, | 295 virtual void ShowContextMenu(ChromeViews::View* source, |
298 int x, | 296 int x, |
299 int y, | 297 int y, |
300 bool is_mouse_gesture); | 298 bool is_mouse_gesture); |
301 | 299 |
302 // Creates the button for rendering the specified bookmark node. | 300 // Creates the button for rendering the specified bookmark node. |
303 ChromeViews::View* CreateBookmarkButton(BookmarkBarNode* node); | 301 ChromeViews::View* CreateBookmarkButton(BookmarkNode* node); |
304 | 302 |
305 // COnfigures the button from the specified node. This sets the text, | 303 // COnfigures the button from the specified node. This sets the text, |
306 // and icon. | 304 // and icon. |
307 void ConfigureButton(BookmarkBarNode* node, ChromeViews::TextButton* button); | 305 void ConfigureButton(BookmarkNode* node, ChromeViews::TextButton* button); |
308 | 306 |
309 // Used when showing the menu allowing the user to choose when the bar is | 307 // Used when showing the menu allowing the user to choose when the bar is |
310 // visible. Return value corresponds to the users preference for when the | 308 // visible. Return value corresponds to the users preference for when the |
311 // bar is visible. | 309 // bar is visible. |
312 virtual bool IsItemChecked(int id) const; | 310 virtual bool IsItemChecked(int id) const; |
313 | 311 |
314 // Used when showing the menu allowing the user to choose when the bar is | 312 // Used when showing the menu allowing the user to choose when the bar is |
315 // visible. Updates the preferences to match the users choice as appropriate. | 313 // visible. Updates the preferences to match the users choice as appropriate. |
316 virtual void ExecuteCommand(int id); | 314 virtual void ExecuteCommand(int id); |
317 | 315 |
318 // NotificationService method. | 316 // NotificationService method. |
319 virtual void Observe(NotificationType type, | 317 virtual void Observe(NotificationType type, |
320 const NotificationSource& source, | 318 const NotificationSource& source, |
321 const NotificationDetails& details); | 319 const NotificationDetails& details); |
322 | 320 |
323 // If we have registered an observer on the notification service, this | 321 // If we have registered an observer on the notification service, this |
324 // unregisters it. This does nothing if we have not installed ourself as an | 322 // unregisters it. This does nothing if we have not installed ourself as an |
325 // observer. | 323 // observer. |
326 void RemoveNotificationObservers(); | 324 void RemoveNotificationObservers(); |
327 | 325 |
328 // If the ModelChangedListener is non-null, ModelChanged is invoked on it. | 326 // If the ModelChangedListener is non-null, ModelChanged is invoked on it. |
329 void NotifyModelChanged(); | 327 void NotifyModelChanged(); |
330 | 328 |
331 // Shows the menu used during drag and drop for the specified node. | 329 // Shows the menu used during drag and drop for the specified node. |
332 void ShowDropFolderForNode(BookmarkBarNode* node); | 330 void ShowDropFolderForNode(BookmarkNode* node); |
333 | 331 |
334 // Cancels the timer used to show a drop menu. | 332 // Cancels the timer used to show a drop menu. |
335 void StopShowFolderDropMenuTimer(); | 333 void StopShowFolderDropMenuTimer(); |
336 | 334 |
337 // Stars the timer used to show a drop menu for node. | 335 // Stars the timer used to show a drop menu for node. |
338 void StartShowFolderDropMenuTimer(BookmarkBarNode* node); | 336 void StartShowFolderDropMenuTimer(BookmarkNode* node); |
339 | 337 |
340 // Returns the drop operation and index for the drop based on the event | 338 // Returns the drop operation and index for the drop based on the event |
341 // and data. Returns DragDropTypes::DRAG_NONE if not a valid location. | 339 // and data. Returns DragDropTypes::DRAG_NONE if not a valid location. |
342 int CalculateDropOperation(const ChromeViews::DropTargetEvent& event, | 340 int CalculateDropOperation(const ChromeViews::DropTargetEvent& event, |
343 const BookmarkDragData& data, | 341 const BookmarkDragData& data, |
344 int* index, | 342 int* index, |
345 bool* drop_on, | 343 bool* drop_on, |
346 bool* is_over_overflow, | 344 bool* is_over_overflow, |
347 bool* is_over_other); | 345 bool* is_over_other); |
348 | 346 |
349 // Invokes CanDropAt to determine if this is a valid location for the data, | 347 // Invokes CanDropAt to determine if this is a valid location for the data, |
350 // then returns the appropriate drag operation based on the data. | 348 // then returns the appropriate drag operation based on the data. |
351 int CalculateDropOperation(const BookmarkDragData& data, | 349 int CalculateDropOperation(const BookmarkDragData& data, |
352 BookmarkBarNode* parent, | 350 BookmarkNode* parent, |
353 int index); | 351 int index); |
354 | 352 |
355 // Returns true if the specified location is a valid drop location for | 353 // Returns true if the specified location is a valid drop location for |
356 // the supplied drag data. | 354 // the supplied drag data. |
357 bool CanDropAt(const BookmarkDragData& data, | 355 bool CanDropAt(const BookmarkDragData& data, |
358 BookmarkBarNode* parent, | 356 BookmarkNode* parent, |
359 int index); | 357 int index); |
360 | 358 |
361 // Performs a drop of the specified data at the specified location. Returns | 359 // Performs a drop of the specified data at the specified location. Returns |
362 // the result. | 360 // the result. |
363 int PerformDropImpl(const BookmarkDragData& data, | 361 int PerformDropImpl(const BookmarkDragData& data, |
364 BookmarkBarNode* parent_node, | 362 BookmarkNode* parent_node, |
365 int index); | 363 int index); |
366 | 364 |
367 // Creates a new group/entry for data, and recursively invokes itself for | 365 // Creates a new group/entry for data, and recursively invokes itself for |
368 // all children of data. This is used during drag and drop to clone a | 366 // all children of data. This is used during drag and drop to clone a |
369 // group from another profile. | 367 // group from another profile. |
370 void CloneDragData(const BookmarkDragData& data, | 368 void CloneDragData(const BookmarkDragData& data, |
371 BookmarkBarNode* parent, | 369 BookmarkNode* parent, |
372 int index_to_add_at); | 370 int index_to_add_at); |
373 | 371 |
374 // Returns the index of the first hidden bookmark button. If all buttons are | 372 // Returns the index of the first hidden bookmark button. If all buttons are |
375 // visible, this returns GetBookmarkButtonCount(). | 373 // visible, this returns GetBookmarkButtonCount(). |
376 int GetFirstHiddenNodeIndex(); | 374 int GetFirstHiddenNodeIndex(); |
377 | 375 |
378 // If the bookmark bubble is showing this determines which view should throb | 376 // If the bookmark bubble is showing this determines which view should throb |
379 // and starts it throbbing. Does nothing if bookmark bubble isn't showing. | 377 // and starts it throbbing. Does nothing if bookmark bubble isn't showing. |
380 void StartThrobbing(); | 378 void StartThrobbing(); |
381 | 379 |
382 // If a button is currently throbbing, it is stopped. If immediate is true | 380 // If a button is currently throbbing, it is stopped. If immediate is true |
383 // the throb stops immediately, otherwise it stops after a couple more | 381 // the throb stops immediately, otherwise it stops after a couple more |
384 // throbs. | 382 // throbs. |
385 void StopThrobbing(bool immediate); | 383 void StopThrobbing(bool immediate); |
386 | 384 |
387 Profile* profile_; | 385 Profile* profile_; |
388 | 386 |
389 // Used for opening urls. | 387 // Used for opening urls. |
390 PageNavigator* page_navigator_; | 388 PageNavigator* page_navigator_; |
391 | 389 |
392 // Model providing details as to the starred entries/groups that should be | 390 // Model providing details as to the starred entries/groups that should be |
393 // shown. This is owned by the Profile. | 391 // shown. This is owned by the Profile. |
394 BookmarkBarModel* model_; | 392 BookmarkModel* model_; |
395 | 393 |
396 // Used to manage showing a Menu: either for the most recently bookmarked | 394 // Used to manage showing a Menu: either for the most recently bookmarked |
397 // entries, or for the a starred group. | 395 // entries, or for the a starred group. |
398 scoped_ptr<MenuRunner> menu_runner_; | 396 scoped_ptr<MenuRunner> menu_runner_; |
399 | 397 |
400 // Used when showing a menu for drag and drop. That is, if the user drags | 398 // Used when showing a menu for drag and drop. That is, if the user drags |
401 // over a group this becomes non-null and is the MenuRunner used to manage | 399 // over a group this becomes non-null and is the MenuRunner used to manage |
402 // the menu showing the contents of the node. | 400 // the menu showing the contents of the node. |
403 scoped_ptr<MenuRunner> drop_menu_runner_; | 401 scoped_ptr<MenuRunner> drop_menu_runner_; |
404 | 402 |
(...skipping 29 matching lines...) Expand all Loading... |
434 // If the bookmark bubble is showing, this is the visible ancestor of the URL. | 432 // If the bookmark bubble is showing, this is the visible ancestor of the URL. |
435 // The visible ancestor is either the other_bookmarked_button_, | 433 // The visible ancestor is either the other_bookmarked_button_, |
436 // overflow_button_ or a button on the bar. | 434 // overflow_button_ or a button on the bar. |
437 ChromeViews::BaseButton* throbbing_view_; | 435 ChromeViews::BaseButton* throbbing_view_; |
438 | 436 |
439 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 437 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
440 }; | 438 }; |
441 | 439 |
442 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ | 440 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ |
443 | 441 |
OLD | NEW |