OLD | NEW |
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 22 matching lines...) Expand all Loading... |
33 #include "ui/base/animation/animation_delegate.h" | 33 #include "ui/base/animation/animation_delegate.h" |
34 #include "ui/base/animation/slide_animation.h" | 34 #include "ui/base/animation/slide_animation.h" |
35 #include "ui/base/events.h" | 35 #include "ui/base/events.h" |
36 #include "ui/base/resource/resource_bundle.h" | 36 #include "ui/base/resource/resource_bundle.h" |
37 #include "ui/gfx/canvas.h" | 37 #include "ui/gfx/canvas.h" |
38 #include "ui/gfx/screen.h" | 38 #include "ui/gfx/screen.h" |
39 #include "ui/views/events/event.h" | 39 #include "ui/views/events/event.h" |
40 #include "ui/views/widget/root_view.h" | 40 #include "ui/views/widget/root_view.h" |
41 #include "ui/views/widget/widget.h" | 41 #include "ui/views/widget/widget.h" |
42 | 42 |
43 #if defined(USE_AURA) | 43 #if defined(USE_ASH) |
44 #include "ash/wm/property_util.h" | 44 #include "ash/wm/property_util.h" |
45 #endif | 45 #endif |
46 | 46 |
47 using content::UserMetricsAction; | 47 using content::UserMetricsAction; |
48 using content::WebContents; | 48 using content::WebContents; |
49 | 49 |
50 static const int kHorizontalMoveThreshold = 16; // Pixels. | 50 static const int kHorizontalMoveThreshold = 16; // Pixels. |
51 | 51 |
52 // If non-null there is a drag underway. | 52 // If non-null there is a drag underway. |
53 static TabDragController2* instance_; | 53 static TabDragController2* instance_; |
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 break; // Nothing to do for DETACH_ABOVE_OR_BELOW. | 1416 break; // Nothing to do for DETACH_ABOVE_OR_BELOW. |
1417 } | 1417 } |
1418 | 1418 |
1419 SetTrackedByWorkspace(browser->window()->GetNativeHandle(), false); | 1419 SetTrackedByWorkspace(browser->window()->GetNativeHandle(), false); |
1420 browser->window()->SetBounds(new_bounds); | 1420 browser->window()->SetBounds(new_bounds); |
1421 return browser; | 1421 return browser; |
1422 } | 1422 } |
1423 | 1423 |
1424 void TabDragController2::SetTrackedByWorkspace(gfx::NativeWindow window, | 1424 void TabDragController2::SetTrackedByWorkspace(gfx::NativeWindow window, |
1425 bool value) { | 1425 bool value) { |
1426 #if defined(USE_AURA) | 1426 #if defined(USE_ASH) |
1427 ash::SetTrackedByWorkspace(window, value); | 1427 ash::SetTrackedByWorkspace(window, value); |
1428 #endif | 1428 #endif |
1429 } | 1429 } |
OLD | NEW |