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

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

Issue 9836122: Check that an instance variable is non-NULL before use. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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) 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_controller2.h" 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller2.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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 974
975 browser->window()->Show(); 975 browser->window()->Show();
976 browser->window()->Activate(); 976 browser->window()->Activate();
977 dragged_browser_view->GetWidget()->SetVisibilityChangedAnimationsEnabled( 977 dragged_browser_view->GetWidget()->SetVisibilityChangedAnimationsEnabled(
978 true); 978 true);
979 RunMoveLoop(); 979 RunMoveLoop();
980 } 980 }
981 981
982 void TabDragController2::RunMoveLoop() { 982 void TabDragController2::RunMoveLoop() {
983 move_loop_browser_view_ = GetAttachedBrowserView(); 983 move_loop_browser_view_ = GetAttachedBrowserView();
984 DCHECK(move_loop_browser_view_);
984 move_loop_browser_view_->set_move_observer(this); 985 move_loop_browser_view_->set_move_observer(this);
985 is_dragging_window_ = true; 986 is_dragging_window_ = true;
986 bool destroyed = false; 987 bool destroyed = false;
987 destroyed_ = &destroyed; 988 destroyed_ = &destroyed;
988 // Running the move loop release mouse capture on windows, which triggers 989 // Running the move loop release mouse capture on windows, which triggers
989 // destroying the drag loop. Release mouse capture ourself before this while 990 // destroying the drag loop. Release mouse capture ourself before this while
990 // the Dragcontroller isn't owned by the TabStrip. 991 // the Dragcontroller isn't owned by the TabStrip.
991 attached_tabstrip_->ReleaseDragController(); 992 attached_tabstrip_->ReleaseDragController();
992 attached_tabstrip_->GetWidget()->ReleaseMouseCapture(); 993 attached_tabstrip_->GetWidget()->ReleaseMouseCapture();
993 attached_tabstrip_->OwnDragController(this); 994 attached_tabstrip_->OwnDragController(this);
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 browser->window()->SetBounds(new_bounds); 1431 browser->window()->SetBounds(new_bounds);
1431 return browser; 1432 return browser;
1432 } 1433 }
1433 1434
1434 void TabDragController2::SetTrackedByWorkspace(gfx::NativeWindow window, 1435 void TabDragController2::SetTrackedByWorkspace(gfx::NativeWindow window,
1435 bool value) { 1436 bool value) {
1436 #if defined(USE_ASH) 1437 #if defined(USE_ASH)
1437 ash::SetTrackedByWorkspace(window, value); 1438 ash::SetTrackedByWorkspace(window, value);
1438 #endif 1439 #endif
1439 } 1440 }
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