Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 71003: Merge 13106 - Fixes regression in dragging bookmark bar. The bookmark bar wou... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/base_drag_source.h" 10 #include "base/base_drag_source.h"
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 1150
1151 void BookmarkBarView::WriteDragData(BookmarkNode* node, 1151 void BookmarkBarView::WriteDragData(BookmarkNode* node,
1152 OSExchangeData* data) { 1152 OSExchangeData* data) {
1153 DCHECK(node && data); 1153 DCHECK(node && data);
1154 BookmarkDragData drag_data(node); 1154 BookmarkDragData drag_data(node);
1155 drag_data.Write(profile_, data); 1155 drag_data.Write(profile_, data);
1156 } 1156 }
1157 1157
1158 int BookmarkBarView::GetDragOperations(View* sender, int x, int y) { 1158 int BookmarkBarView::GetDragOperations(View* sender, int x, int y) {
1159 if (size_animation_->IsAnimating() || 1159 if (size_animation_->IsAnimating() ||
1160 size_animation_->GetCurrentValue() == 0) { 1160 (size_animation_->GetCurrentValue() == 0 && !OnNewTabPage())) {
1161 // Don't let the user drag while animating open or we're closed. This 1161 // Don't let the user drag while animating open or we're closed (and not on
1162 // the new tab page, on the new tab page size_animation_ is always 0). This
1162 // typically is only hit if the user does something to inadvertanty trigger 1163 // typically is only hit if the user does something to inadvertanty trigger
1163 // dnd, such as pressing the mouse and hitting control-b. 1164 // dnd, such as pressing the mouse and hitting control-b.
1164 return DragDropTypes::DRAG_NONE; 1165 return DragDropTypes::DRAG_NONE;
1165 } 1166 }
1166 1167
1167 for (int i = 0; i < GetBookmarkButtonCount(); ++i) { 1168 for (int i = 0; i < GetBookmarkButtonCount(); ++i) {
1168 if (sender == GetBookmarkButton(i)) { 1169 if (sender == GetBookmarkButton(i)) {
1169 return bookmark_utils::BookmarkDragOperation( 1170 return bookmark_utils::BookmarkDragOperation(
1170 model_->GetBookmarkBarNode()->GetChild(i)); 1171 model_->GetBookmarkBarNode()->GetChild(i));
1171 } 1172 }
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 } 1647 }
1647 1648
1648 void BookmarkBarView::StopThrobbing(bool immediate) { 1649 void BookmarkBarView::StopThrobbing(bool immediate) {
1649 if (!throbbing_view_) 1650 if (!throbbing_view_)
1650 return; 1651 return;
1651 1652
1652 // If not immediate, cycle through 2 more complete cycles. 1653 // If not immediate, cycle through 2 more complete cycles.
1653 throbbing_view_->StartThrobbing(immediate ? 0 : 4); 1654 throbbing_view_->StartThrobbing(immediate ? 0 : 4);
1654 throbbing_view_ = NULL; 1655 throbbing_view_ = NULL;
1655 } 1656 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698