OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 drag_utils::SetDragImageOnDataObject(canvas, button->size(), press_pt, | 1098 drag_utils::SetDragImageOnDataObject(canvas, button->size(), press_pt, |
1099 data); | 1099 data); |
1100 WriteDragData(model_->GetBookmarkBarNode()->GetChild(i), data); | 1100 WriteDragData(model_->GetBookmarkBarNode()->GetChild(i), data); |
1101 return; | 1101 return; |
1102 } | 1102 } |
1103 } | 1103 } |
1104 NOTREACHED(); | 1104 NOTREACHED(); |
1105 } | 1105 } |
1106 | 1106 |
1107 int BookmarkBarView::GetDragOperations(View* sender, const gfx::Point& p) { | 1107 int BookmarkBarView::GetDragOperations(View* sender, const gfx::Point& p) { |
1108 if (size_animation_->IsAnimating() || | 1108 if (size_animation_->is_animating() || |
1109 (size_animation_->GetCurrentValue() == 0 && !OnNewTabPage())) { | 1109 (size_animation_->GetCurrentValue() == 0 && !OnNewTabPage())) { |
1110 // Don't let the user drag while animating open or we're closed (and not on | 1110 // Don't let the user drag while animating open or we're closed (and not on |
1111 // the new tab page, on the new tab page size_animation_ is always 0). This | 1111 // the new tab page, on the new tab page size_animation_ is always 0). This |
1112 // typically is only hit if the user does something to inadvertanty trigger | 1112 // typically is only hit if the user does something to inadvertanty trigger |
1113 // dnd, such as pressing the mouse and hitting control-b. | 1113 // dnd, such as pressing the mouse and hitting control-b. |
1114 return DragDropTypes::DRAG_NONE; | 1114 return DragDropTypes::DRAG_NONE; |
1115 } | 1115 } |
1116 | 1116 |
1117 for (int i = 0; i < GetBookmarkButtonCount(); ++i) { | 1117 for (int i = 0; i < GetBookmarkButtonCount(); ++i) { |
1118 if (sender == GetBookmarkButton(i)) { | 1118 if (sender == GetBookmarkButton(i)) { |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 // The tooltip is the only way we have to display text explaining the error | 1708 // The tooltip is the only way we have to display text explaining the error |
1709 // to the user. | 1709 // to the user. |
1710 sync_error_button->SetTooltipText( | 1710 sync_error_button->SetTooltipText( |
1711 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)); | 1711 l10n_util::GetString(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)); |
1712 sync_error_button->SetAccessibleName( | 1712 sync_error_button->SetAccessibleName( |
1713 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON)); | 1713 l10n_util::GetString(IDS_ACCNAME_SYNC_ERROR_BUTTON)); |
1714 sync_error_button->SetIcon( | 1714 sync_error_button->SetIcon( |
1715 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); | 1715 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); |
1716 return sync_error_button; | 1716 return sync_error_button; |
1717 } | 1717 } |
OLD | NEW |