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

Side by Side Diff: ash/drag_drop/drag_drop_controller.h

Issue 9222018: reland -- Disable animations during aura tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 | « ash/app_list/app_list.cc ('k') | ash/drag_drop/drag_drop_controller.cc » ('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 #ifndef ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ 5 #ifndef ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
6 #define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ 6 #define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ui/aura/client/drag_drop_client.h" 10 #include "ui/aura/client/drag_drop_client.h"
(...skipping 18 matching lines...) Expand all
29 class DragDropControllerTest; 29 class DragDropControllerTest;
30 } 30 }
31 31
32 namespace internal { 32 namespace internal {
33 33
34 class DragImageView; 34 class DragImageView;
35 35
36 class ASH_EXPORT DragDropController 36 class ASH_EXPORT DragDropController
37 : public aura::client::DragDropClient, 37 : public aura::client::DragDropClient,
38 public aura::EventFilter, 38 public aura::EventFilter,
39 public ui::LayerAnimationObserver { 39 public ui::ImplicitAnimationObserver {
40 public: 40 public:
41 DragDropController(); 41 DragDropController();
42 virtual ~DragDropController(); 42 virtual ~DragDropController();
43 43
44 void set_should_block_during_drag_drop(bool should_block_during_drag_drop) { 44 void set_should_block_during_drag_drop(bool should_block_during_drag_drop) {
45 should_block_during_drag_drop_ = should_block_during_drag_drop; 45 should_block_during_drag_drop_ = should_block_during_drag_drop;
46 } 46 }
47 47
48 // Overridden from aura::client::DragDropClient: 48 // Overridden from aura::client::DragDropClient:
49 virtual int StartDragAndDrop(const ui::OSExchangeData& data, 49 virtual int StartDragAndDrop(const ui::OSExchangeData& data,
50 int operation) OVERRIDE; 50 int operation) OVERRIDE;
(...skipping 11 matching lines...) Expand all
62 aura::MouseEvent* event) OVERRIDE; 62 aura::MouseEvent* event) OVERRIDE;
63 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, 63 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
64 aura::TouchEvent* event) OVERRIDE; 64 aura::TouchEvent* event) OVERRIDE;
65 virtual ui::GestureStatus PreHandleGestureEvent( 65 virtual ui::GestureStatus PreHandleGestureEvent(
66 aura::Window* target, 66 aura::Window* target,
67 aura::GestureEvent* event) OVERRIDE; 67 aura::GestureEvent* event) OVERRIDE;
68 68
69 private: 69 private:
70 friend class ash::test::DragDropControllerTest; 70 friend class ash::test::DragDropControllerTest;
71 71
72 // Overridden from ui::LayerAnimationObserver: 72 // Implementation of ImplicitAnimationObserver
73 virtual void OnLayerAnimationEnded( 73 virtual void OnImplicitAnimationsCompleted() OVERRIDE;
74 const ui::LayerAnimationSequence* sequence) OVERRIDE;
75 virtual void OnLayerAnimationAborted(
76 const ui::LayerAnimationSequence* sequence) OVERRIDE;
77 virtual void OnLayerAnimationScheduled(
78 const ui::LayerAnimationSequence* sequence) OVERRIDE {}
79 74
80 // Helper method to start drag widget flying back animation. 75 // Helper method to start drag widget flying back animation.
81 void StartCanceledAnimation(); 76 void StartCanceledAnimation();
82 77
83 // Helper method to reset everything. 78 // Helper method to reset everything.
84 void Cleanup(); 79 void Cleanup();
85 80
86 scoped_ptr<DragImageView> drag_image_; 81 scoped_ptr<DragImageView> drag_image_;
87 const ui::OSExchangeData* drag_data_; 82 const ui::OSExchangeData* drag_data_;
88 int drag_operation_; 83 int drag_operation_;
89 aura::Window* dragged_window_; 84 aura::Window* dragged_window_;
90 gfx::Point drag_start_location_; 85 gfx::Point drag_start_location_;
91 86
92 bool drag_drop_in_progress_; 87 bool drag_drop_in_progress_;
93 88
94 // Indicates whether the caller should be blocked on a drag/drop session. 89 // Indicates whether the caller should be blocked on a drag/drop session.
95 // Only be used for tests. 90 // Only be used for tests.
96 bool should_block_during_drag_drop_; 91 bool should_block_during_drag_drop_;
97 92
98 DISALLOW_COPY_AND_ASSIGN(DragDropController); 93 DISALLOW_COPY_AND_ASSIGN(DragDropController);
99 }; 94 };
100 95
101 } // namespace internal 96 } // namespace internal
102 } // namespace ash 97 } // namespace ash
103 98
104 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ 99 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/app_list/app_list.cc ('k') | ash/drag_drop/drag_drop_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698