| 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 #include "chrome/browser/views/bookmark_bar_view.h" | 5 #include "chrome/browser/views/bookmark_bar_view.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/base_drag_source.h" | 9 #include "base/base_drag_source.h" |
| 10 #include "chrome/app/theme/theme_resources.h" | 10 #include "chrome/app/theme/theme_resources.h" |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1358 if (sender == GetBookmarkButton(i)) { | 1358 if (sender == GetBookmarkButton(i)) { |
| 1359 return GetDragOperationsForNode( | 1359 return GetDragOperationsForNode( |
| 1360 model_->GetBookmarkBarNode()->GetChild(i)); | 1360 model_->GetBookmarkBarNode()->GetChild(i)); |
| 1361 } | 1361 } |
| 1362 } | 1362 } |
| 1363 NOTREACHED(); | 1363 NOTREACHED(); |
| 1364 return DragDropTypes::DRAG_NONE; | 1364 return DragDropTypes::DRAG_NONE; |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 void BookmarkBarView::RunMenu(views::View* view, | 1367 void BookmarkBarView::RunMenu(views::View* view, |
| 1368 const CPoint& pt, | 1368 const gfx::Point& pt, |
| 1369 HWND hwnd) { | 1369 HWND hwnd) { |
| 1370 BookmarkNode* node; | 1370 BookmarkNode* node; |
| 1371 MenuItemView::AnchorPosition anchor_point = MenuItemView::TOPLEFT; | 1371 MenuItemView::AnchorPosition anchor_point = MenuItemView::TOPLEFT; |
| 1372 | 1372 |
| 1373 // When we set the menu's position, we must take into account the mirrored | 1373 // When we set the menu's position, we must take into account the mirrored |
| 1374 // position of the View relative to its parent. This can be easily done by | 1374 // position of the View relative to its parent. This can be easily done by |
| 1375 // passing the right flag to View::x(). | 1375 // passing the right flag to View::x(). |
| 1376 int x = view->GetX(APPLY_MIRRORING_TRANSFORMATION); | 1376 int x = view->GetX(APPLY_MIRRORING_TRANSFORMATION); |
| 1377 int bar_height = height() - kMenuOffset; | 1377 int bar_height = height() - kMenuOffset; |
| 1378 | 1378 |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 void BookmarkBarView::StopThrobbing(bool immediate) { | 1848 void BookmarkBarView::StopThrobbing(bool immediate) { |
| 1849 if (!throbbing_view_) | 1849 if (!throbbing_view_) |
| 1850 return; | 1850 return; |
| 1851 | 1851 |
| 1852 // If not immediate, cycle through 2 more complete cycles. | 1852 // If not immediate, cycle through 2 more complete cycles. |
| 1853 throbbing_view_->StartThrobbing(immediate ? 0 : 4); | 1853 throbbing_view_->StartThrobbing(immediate ? 0 : 4); |
| 1854 throbbing_view_ = NULL; | 1854 throbbing_view_ = NULL; |
| 1855 } | 1855 } |
| OLD | NEW |