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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 10833038: Changed a DCHECK() that checked two conditions two two DCHECK()s that check one condition each. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/tabs/tab_drag_controller.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 } 1606 }
1607 } 1607 }
1608 } 1608 }
1609 if (!has_one_valid_tab) 1609 if (!has_one_valid_tab)
1610 return; 1610 return;
1611 1611
1612 model->SetSelectionFromModel(selection_model); 1612 model->SetSelectionFromModel(selection_model);
1613 } 1613 }
1614 1614
1615 void TabDragController::RevertDragAt(size_t drag_index) { 1615 void TabDragController::RevertDragAt(size_t drag_index) {
1616 DCHECK(started_drag_ && source_tabstrip_); 1616 DCHECK(started_drag_);
1617 DCHECK(source_tabstrip_);
1617 1618
1618 TabDragData* data = &(drag_data_[drag_index]); 1619 TabDragData* data = &(drag_data_[drag_index]);
1619 if (attached_tabstrip_) { 1620 if (attached_tabstrip_) {
1620 int index = 1621 int index =
1621 GetModel(attached_tabstrip_)->GetIndexOfTabContents(data->contents); 1622 GetModel(attached_tabstrip_)->GetIndexOfTabContents(data->contents);
1622 if (attached_tabstrip_ != source_tabstrip_) { 1623 if (attached_tabstrip_ != source_tabstrip_) {
1623 // The Tab was inserted into another TabStrip. We need to put it back 1624 // The Tab was inserted into another TabStrip. We need to put it back
1624 // into the original one. 1625 // into the original one.
1625 GetModel(attached_tabstrip_)->DetachTabContentsAt(index); 1626 GetModel(attached_tabstrip_)->DetachTabContentsAt(index);
1626 // TODO(beng): (Cleanup) seems like we should use Attach() for this 1627 // TODO(beng): (Cleanup) seems like we should use Attach() for this
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 gfx::Point touch_point; 1926 gfx::Point touch_point;
1926 bool got_touch_point = widget_window->GetRootWindow()-> 1927 bool got_touch_point = widget_window->GetRootWindow()->
1927 gesture_recognizer()->GetLastTouchPointForTarget(widget_window, 1928 gesture_recognizer()->GetLastTouchPointForTarget(widget_window,
1928 &touch_point); 1929 &touch_point);
1929 DCHECK(got_touch_point); 1930 DCHECK(got_touch_point);
1930 return touch_point; 1931 return touch_point;
1931 } 1932 }
1932 #endif 1933 #endif
1933 return gfx::Screen::GetCursorScreenPoint(); 1934 return gfx::Screen::GetCursorScreenPoint();
1934 } 1935 }
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