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

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

Issue 11343028: Revert 164652 - speculative revert - this change may have caused print dialog test failures on XP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
===================================================================
--- chrome/browser/ui/views/tabs/tab_drag_controller.cc (revision 164764)
+++ chrome/browser/ui/views/tabs/tab_drag_controller.cc (working copy)
@@ -47,7 +47,6 @@
#if defined(USE_ASH)
#include "ash/shell.h"
#include "ash/wm/property_util.h"
-#include "ash/wm/window_util.h"
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/base/gestures/gesture_recognizer.h"
@@ -192,12 +191,6 @@
#endif
}
-void SetWindowPositionManaged(gfx::NativeWindow window, bool value) {
-#if defined(USE_ASH)
- ash::wm::SetWindowPositionManaged(window, value);
-#endif
-}
-
bool ShouldDetachIntoNewBrowser() {
#if defined(USE_AURA)
return true;
@@ -218,19 +211,6 @@
return y >= lower_threshold && y <= upper_threshold;
}
-// WidgetObserver implementation that resets the window position managed
-// property on Show.
-// We're forced to do this here since BrowserFrameAura resets the 'window
-// position managed' property during a show and we need the property set to
-// false before WorkspaceLayoutManager2 sees the visibility change.
-class WindowPositionManagedUpdater : public views::WidgetObserver {
- public:
- virtual void OnWidgetVisibilityChanged(views::Widget* widget,
- bool visible) OVERRIDE {
- SetWindowPositionManaged(widget->GetNativeView(), false);
- }
-};
-
} // namespace
///////////////////////////////////////////////////////////////////////////////
@@ -393,7 +373,6 @@
if (move_loop_widget_) {
move_loop_widget_->RemoveObserver(this);
SetTrackedByWorkspace(move_loop_widget_->GetNativeView(), true);
- SetWindowPositionManaged(move_loop_widget_->GetNativeView(), true);
}
if (source_tabstrip_ && detach_into_browser_)
@@ -850,10 +829,6 @@
#else
target_tabstrip->GetWidget()->SetCapture(attached_tabstrip_);
#endif
- // The window is going away. Since the drag is still on going we don't want
- // that to effect the position of any windows.
- SetWindowPositionManaged(browser_widget->GetNativeView(), false);
-
// EndMoveLoop is going to snap the window back to its original location.
// Hide it so users don't see this.
browser_widget->Hide();
@@ -1324,11 +1299,7 @@
// TODO: come up with a cleaner way to do this.
attached_tabstrip_->SetTabBoundsForDrag(drag_bounds);
- WindowPositionManagedUpdater updater;
- dragged_browser_view->GetWidget()->AddObserver(&updater);
browser->window()->Show();
- dragged_browser_view->GetWidget()->RemoveObserver(&updater);
-
browser->window()->Activate();
dragged_browser_view->GetWidget()->SetVisibilityChangedAnimationsEnabled(
true);
@@ -1585,11 +1556,8 @@
// happens we ignore it.
waiting_for_run_loop_to_exit_ = true;
- if (type == NORMAL || (type == TAB_DESTROYED && drag_data_.size() > 1)) {
+ if (type == NORMAL || (type == TAB_DESTROYED && drag_data_.size() > 1))
SetTrackedByWorkspace(GetAttachedBrowserWidget()->GetNativeView(), true);
- SetWindowPositionManaged(GetAttachedBrowserWidget()->GetNativeView(),
- true);
- }
// End the nested drag loop.
GetAttachedBrowserWidget()->EndMoveLoop();
@@ -2002,7 +1970,6 @@
create_params.initial_bounds = new_bounds;
Browser* browser = new Browser(create_params);
SetTrackedByWorkspace(browser->window()->GetNativeWindow(), false);
- SetWindowPositionManaged(browser->window()->GetNativeWindow(), false);
// If the window is created maximized then the bounds we supplied are ignored.
// We need to reset them again so they are honored.
browser->window()->SetBounds(new_bounds);

Powered by Google App Engine
This is Rietveld 408576698