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

Side by Side Diff: chrome/browser/views/tabs/dragged_tab_controller.cc

Issue 13221: Fixes possible flicker when tab finishes animating back to dragged... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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) 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 <math.h> 5 #include <math.h>
6 #include <set> 6 #include <set>
7 7
8 #include "chrome/browser/views/tabs/dragged_tab_controller.h" 8 #include "chrome/browser/views/tabs/dragged_tab_controller.h"
9 9
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 source_tabstrip_->DestroyDraggedSourceTab(source_tab_); 1127 source_tabstrip_->DestroyDraggedSourceTab(source_tab_);
1128 source_tab_ = NULL; 1128 source_tab_ = NULL;
1129 } 1129 }
1130 } 1130 }
1131 1131
1132 void DraggedTabController::OnAnimateToBoundsComplete() { 1132 void DraggedTabController::OnAnimateToBoundsComplete() {
1133 // Sometimes, for some reason, in automation we can be called back on a 1133 // Sometimes, for some reason, in automation we can be called back on a
1134 // detach even though we aren't attached to a TabStrip. Guard against that. 1134 // detach even though we aren't attached to a TabStrip. Guard against that.
1135 if (attached_tabstrip_) { 1135 if (attached_tabstrip_) {
1136 Tab* tab = GetTabMatchingDraggedContents(attached_tabstrip_); 1136 Tab* tab = GetTabMatchingDraggedContents(attached_tabstrip_);
1137 if (tab) 1137 if (tab) {
1138 tab->SetVisible(true); 1138 tab->SetVisible(true);
1139 // Paint the tab now, otherwise there may be slight flicker between the
1140 // time the dragged tab window is destroyed and we paint.
1141 tab->PaintNow();
1142 }
1139 } 1143 }
1140 CleanUpHiddenFrame(); 1144 CleanUpHiddenFrame();
1141 1145
1142 if (!in_destructor_) 1146 if (!in_destructor_)
1143 source_tabstrip_->DestroyDragController(); 1147 source_tabstrip_->DestroyDragController();
1144 } 1148 }
1145 1149
1146 void DraggedTabController::DockDisplayerDestroyed( 1150 void DraggedTabController::DockDisplayerDestroyed(
1147 DockDisplayer* controller) { 1151 DockDisplayer* controller) {
1148 std::set<HWND>::iterator dock_i = 1152 std::set<HWND>::iterator dock_i =
1149 dock_windows_.find(controller->popup_hwnd()); 1153 dock_windows_.find(controller->popup_hwnd());
1150 if (dock_i != dock_windows_.end()) 1154 if (dock_i != dock_windows_.end())
1151 dock_windows_.erase(dock_i); 1155 dock_windows_.erase(dock_i);
1152 else 1156 else
1153 NOTREACHED(); 1157 NOTREACHED();
1154 1158
1155 std::vector<DockDisplayer*>::iterator i = 1159 std::vector<DockDisplayer*>::iterator i =
1156 std::find(dock_controllers_.begin(), dock_controllers_.end(), 1160 std::find(dock_controllers_.begin(), dock_controllers_.end(),
1157 controller); 1161 controller);
1158 if (i != dock_controllers_.end()) 1162 if (i != dock_controllers_.end())
1159 dock_controllers_.erase(i); 1163 dock_controllers_.erase(i);
1160 else 1164 else
1161 NOTREACHED(); 1165 NOTREACHED();
1162 } 1166 }
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