summaryrefslogtreecommitdiffstats
path: root/ash/drag_drop/drag_drop_controller.h
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-09 17:31:13 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-09 17:31:13 +0000
commitbb612dbae46c38ff616c3c65a246b9b8f4f4dab8 (patch)
treeb660d2b6af1b6b7f1d0034629eaae49fef44bbbe /ash/drag_drop/drag_drop_controller.h
parent75209fd0aec385d547e12a4c8338f181faa3f0df (diff)
downloadchromium_src-bb612dbae46c38ff616c3c65a246b9b8f4f4dab8.zip
chromium_src-bb612dbae46c38ff616c3c65a246b9b8f4f4dab8.tar.gz
chromium_src-bb612dbae46c38ff616c3c65a246b9b8f4f4dab8.tar.bz2
aura: animate drag widget at the end of a drag-drop session.
BUG=97845 TEST=manual Review URL: http://codereview.chromium.org/9123019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/drag_drop/drag_drop_controller.h')
-rw-r--r--ash/drag_drop/drag_drop_controller.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/ash/drag_drop/drag_drop_controller.h b/ash/drag_drop/drag_drop_controller.h
index 1d895d6..dd3b028 100644
--- a/ash/drag_drop/drag_drop_controller.h
+++ b/ash/drag_drop/drag_drop_controller.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,12 +12,17 @@
#include "ui/aura/event_filter.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/events.h"
+#include "ui/gfx/compositor/layer_animation_observer.h"
#include "ui/gfx/point.h"
namespace aura {
class Window;
}
+namespace ui {
+class LayerAnimationSequence;
+}
+
namespace ash {
namespace test {
@@ -30,7 +35,8 @@ class DragImageView;
class ASH_EXPORT DragDropController
: public aura::client::DragDropClient,
- public aura::EventFilter {
+ public aura::EventFilter,
+ public ui::LayerAnimationObserver {
public:
DragDropController();
virtual ~DragDropController();
@@ -60,6 +66,17 @@ class ASH_EXPORT DragDropController
private:
friend class ash::test::DragDropControllerTest;
+ // Overridden from ui::LayerAnimationObserver:
+ void OnLayerAnimationEnded(
+ const ui::LayerAnimationSequence* sequence) OVERRIDE;
+ void OnLayerAnimationAborted(
+ const ui::LayerAnimationSequence* sequence) OVERRIDE;
+ void OnLayerAnimationScheduled(
+ const ui::LayerAnimationSequence* sequence) OVERRIDE {}
+
+ // Helper method to start drag widget flying back animation.
+ void StartCanceledAnimation();
+
// Helper method to reset everything.
void Cleanup();
@@ -67,6 +84,7 @@ class ASH_EXPORT DragDropController
const ui::OSExchangeData* drag_data_;
int drag_operation_;
aura::Window* dragged_window_;
+ gfx::Point drag_start_location_;
bool drag_drop_in_progress_;