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 "app/gfx/chrome_canvas.h" | 9 #include "app/gfx/chrome_canvas.h" |
10 #include "app/gfx/text_elider.h" | 10 #include "app/gfx/text_elider.h" |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 if (sender == GetBookmarkButton(i)) { | 1086 if (sender == GetBookmarkButton(i)) { |
1087 return bookmark_utils::BookmarkDragOperation( | 1087 return bookmark_utils::BookmarkDragOperation( |
1088 model_->GetBookmarkBarNode()->GetChild(i)); | 1088 model_->GetBookmarkBarNode()->GetChild(i)); |
1089 } | 1089 } |
1090 } | 1090 } |
1091 NOTREACHED(); | 1091 NOTREACHED(); |
1092 return DragDropTypes::DRAG_NONE; | 1092 return DragDropTypes::DRAG_NONE; |
1093 } | 1093 } |
1094 | 1094 |
1095 void BookmarkBarView::RunMenu(views::View* view, | 1095 void BookmarkBarView::RunMenu(views::View* view, |
1096 const CPoint& pt, | 1096 const gfx::Point& pt, |
1097 HWND hwnd) { | 1097 HWND hwnd) { |
1098 BookmarkNode* node; | 1098 BookmarkNode* node; |
1099 MenuItemView::AnchorPosition anchor_point = MenuItemView::TOPLEFT; | 1099 MenuItemView::AnchorPosition anchor_point = MenuItemView::TOPLEFT; |
1100 | 1100 |
1101 // When we set the menu's position, we must take into account the mirrored | 1101 // When we set the menu's position, we must take into account the mirrored |
1102 // position of the View relative to its parent. This can be easily done by | 1102 // position of the View relative to its parent. This can be easily done by |
1103 // passing the right flag to View::x(). | 1103 // passing the right flag to View::x(). |
1104 int x = view->GetX(APPLY_MIRRORING_TRANSFORMATION); | 1104 int x = view->GetX(APPLY_MIRRORING_TRANSFORMATION); |
1105 int bar_height = height() - kMenuOffset; | 1105 int bar_height = height() - kMenuOffset; |
1106 | 1106 |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1532 } | 1532 } |
1533 | 1533 |
1534 void BookmarkBarView::StopThrobbing(bool immediate) { | 1534 void BookmarkBarView::StopThrobbing(bool immediate) { |
1535 if (!throbbing_view_) | 1535 if (!throbbing_view_) |
1536 return; | 1536 return; |
1537 | 1537 |
1538 // If not immediate, cycle through 2 more complete cycles. | 1538 // If not immediate, cycle through 2 more complete cycles. |
1539 throbbing_view_->StartThrobbing(immediate ? 0 : 4); | 1539 throbbing_view_->StartThrobbing(immediate ? 0 : 4); |
1540 throbbing_view_ = NULL; | 1540 throbbing_view_ = NULL; |
1541 } | 1541 } |
OLD | NEW |