| 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_drag_data.h" | 8 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 10 #include "chrome/common/slide_animation.h" | 10 #include "chrome/common/slide_animation.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 bool* is_over_overflow, | 345 bool* is_over_overflow, |
| 346 bool* is_over_other); | 346 bool* is_over_other); |
| 347 | 347 |
| 348 // Invokes CanDropAt to determine if this is a valid location for the data, | 348 // Invokes CanDropAt to determine if this is a valid location for the data, |
| 349 // then returns the appropriate drag operation based on the data. | 349 // then returns the appropriate drag operation based on the data. |
| 350 int CalculateDropOperation(const views::DropTargetEvent& event, | 350 int CalculateDropOperation(const views::DropTargetEvent& event, |
| 351 const BookmarkDragData& data, | 351 const BookmarkDragData& data, |
| 352 BookmarkNode* parent, | 352 BookmarkNode* parent, |
| 353 int index); | 353 int index); |
| 354 | 354 |
| 355 // Returns true if the specified location is a valid drop location for | |
| 356 // the supplied drag data. | |
| 357 bool CanDropAt(const BookmarkDragData& data, | |
| 358 BookmarkNode* parent, | |
| 359 int index); | |
| 360 | |
| 361 // Performs a drop of the specified data at the specified location. Returns | 355 // Performs a drop of the specified data at the specified location. Returns |
| 362 // the result. | 356 // the result. |
| 363 int PerformDropImpl(const BookmarkDragData& data, | 357 int PerformDropImpl(const BookmarkDragData& data, |
| 364 BookmarkNode* parent_node, | 358 BookmarkNode* parent_node, |
| 365 int index); | 359 int index); |
| 366 | 360 |
| 367 // 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 | |
| 369 // group from another profile. | |
| 370 void CloneDragData(const BookmarkDragData::Element& data, | |
| 371 BookmarkNode* parent, | |
| 372 int index_to_add_at); | |
| 373 | |
| 374 // Returns the index of the first hidden bookmark button. If all buttons are | 361 // Returns the index of the first hidden bookmark button. If all buttons are |
| 375 // visible, this returns GetBookmarkButtonCount(). | 362 // visible, this returns GetBookmarkButtonCount(). |
| 376 int GetFirstHiddenNodeIndex(); | 363 int GetFirstHiddenNodeIndex(); |
| 377 | 364 |
| 378 // If the bookmark bubble is showing this determines which view should throb | 365 // 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. | 366 // and starts it throbbing. Does nothing if bookmark bubble isn't showing. |
| 380 void StartThrobbing(); | 367 void StartThrobbing(); |
| 381 | 368 |
| 382 // If a button is currently throbbing, it is stopped. If immediate is true | 369 // 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 | 370 // the throb stops immediately, otherwise it stops after a couple more |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 // If the bookmark bubble is showing, this is the visible ancestor of the URL. | 421 // If the bookmark bubble is showing, this is the visible ancestor of the URL. |
| 435 // The visible ancestor is either the other_bookmarked_button_, | 422 // The visible ancestor is either the other_bookmarked_button_, |
| 436 // overflow_button_ or a button on the bar. | 423 // overflow_button_ or a button on the bar. |
| 437 views::BaseButton* throbbing_view_; | 424 views::BaseButton* throbbing_view_; |
| 438 | 425 |
| 439 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 426 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
| 440 }; | 427 }; |
| 441 | 428 |
| 442 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ | 429 #endif // CHROME_BROWSER_VIEWS_BOOKMARK_BAR_VIEW_H_ |
| 443 | 430 |
| OLD | NEW |