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

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

Issue 262893002: Removes grab input window and extra grab and ungrab in X11WholeScreenMoveLoop Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removes grab input window and extra grab and ungrab in X11WholeScreenMoveLoop (nits) Created 6 years, 7 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 | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h » ('j') | 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/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 dragged_widget->GetNativeView()); 1170 dragged_widget->GetNativeView());
1171 #endif 1171 #endif
1172 dragged_widget->SetVisibilityChangedAnimationsEnabled(false); 1172 dragged_widget->SetVisibilityChangedAnimationsEnabled(false);
1173 Attach(dragged_browser_view->tabstrip(), gfx::Point()); 1173 Attach(dragged_browser_view->tabstrip(), gfx::Point());
1174 AdjustBrowserAndTabBoundsForDrag(last_tabstrip_width, 1174 AdjustBrowserAndTabBoundsForDrag(last_tabstrip_width,
1175 point_in_screen, 1175 point_in_screen,
1176 &drag_bounds); 1176 &drag_bounds);
1177 WindowPositionManagedUpdater updater; 1177 WindowPositionManagedUpdater updater;
1178 dragged_widget->AddObserver(&updater); 1178 dragged_widget->AddObserver(&updater);
1179 browser->window()->Show(); 1179 browser->window()->Show();
1180 // Set capture after the newly created browser widget is visible.
1181 attached_tabstrip_->GetWidget()->SetCapture(attached_tabstrip_);
sky 2014/05/23 15:56:13 Did you verify this doesn't cause any issues on wi
varkha 2014/05/23 23:57:48 Done.
1180 dragged_widget->RemoveObserver(&updater); 1182 dragged_widget->RemoveObserver(&updater);
1181 dragged_widget->SetVisibilityChangedAnimationsEnabled(true); 1183 dragged_widget->SetVisibilityChangedAnimationsEnabled(true);
1182 // Activate may trigger a focus loss, destroying us. 1184 // Activate may trigger a focus loss, destroying us.
1183 { 1185 {
1184 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr()); 1186 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr());
1185 browser->window()->Activate(); 1187 browser->window()->Activate();
1186 if (!ref) 1188 if (!ref)
1187 return; 1189 return;
1188 } 1190 }
1189 RunMoveLoop(drag_offset); 1191 RunMoveLoop(drag_offset);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 it != browser_list->end(); ++it) { 1939 it != browser_list->end(); ++it) {
1938 if ((*it)->tab_strip_model()->empty()) 1940 if ((*it)->tab_strip_model()->empty())
1939 exclude.insert((*it)->window()->GetNativeWindow()); 1941 exclude.insert((*it)->window()->GetNativeWindow());
1940 } 1942 }
1941 #endif 1943 #endif
1942 return GetLocalProcessWindowAtPoint(host_desktop_type_, 1944 return GetLocalProcessWindowAtPoint(host_desktop_type_,
1943 screen_point, 1945 screen_point,
1944 exclude); 1946 exclude);
1945 1947
1946 } 1948 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698