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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 12179007: While screencasting a tab, do not disable rendering updates while hidden. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed calls to SetCapturingContents() on start/end of drag. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index c3980924258555be4adeb146fc11318f6f8da8a6..79ce2d21fd85313d683d31ecac637e332c877638 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -489,6 +489,9 @@ void TabDragController::Drag(const gfx::Point& point_in_screen) {
return; // User hasn't dragged far enough yet.
started_drag_ = true;
+ // Prevent the WebContents HWND from being hidden by any of the model
+ // operations performed during the drag.
+ source_dragged_contents()->SetCapturingContents(true);
sky 2013/02/04 15:02:25 At this point the tab is very likely still in the
miu 2013/02/04 21:36:52 Short story: It's the simplest solution that fixes
sky 2013/02/04 22:48:50 None-the-less it's the *wrong* state. The tab is n
miu 2013/02/05 01:06:25 Fixed. This was all a bit confusing to me. Would
SaveFocus();
Attach(source_tabstrip_, gfx::Point());
if (detach_into_browser_ && static_cast<int>(drag_data_.size()) ==
@@ -1135,9 +1138,6 @@ void TabDragController::Attach(TabStrip* attached_tabstrip,
drag_data_[i].contents->SetDelegate(NULL);
drag_data_[i].original_delegate = NULL;
}
-
- // Return the WebContents to normalcy.
- source_dragged_contents()->SetCapturingContents(false);
}
// Inserting counts as a move. We don't want the tabs to jitter when the
@@ -1223,11 +1223,6 @@ void TabDragController::Detach(ReleaseCapture release_capture) {
mouse_move_direction_ = kMovedMouseLeft | kMovedMouseRight;
- // Prevent the WebContents HWND from being hidden by any of the model
- // operations performed during the drag.
- if (!detach_into_browser_)
- source_dragged_contents()->SetCapturingContents(true);
-
std::vector<gfx::Rect> drag_bounds = CalculateBoundsForDraggedTabs(0);
TabStripModel* attached_model = GetModel(attached_tabstrip_);
std::vector<TabRendererData> tab_data;
@@ -1605,6 +1600,7 @@ void TabDragController::EndDragImpl(EndDragType type) {
// enough to trigger a drag.
if (started_drag_) {
RestoreFocus();
+ source_dragged_contents()->SetCapturingContents(false);
if (type == CANCELED)
RevertDrag();
else

Powered by Google App Engine
This is Rietveld 408576698