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

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

Issue 10825143: aura: Fix a couple of drag drop issues: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 4 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 | 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 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "ui/aura/client/drag_drop_client.h" 10 #include "ui/aura/client/drag_drop_client.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Overridden from aura::client::DragDropClient: 50 // Overridden from aura::client::DragDropClient:
51 virtual int StartDragAndDrop(const ui::OSExchangeData& data, 51 virtual int StartDragAndDrop(const ui::OSExchangeData& data,
52 const gfx::Point& root_location, 52 const gfx::Point& root_location,
53 int operation) OVERRIDE; 53 int operation) OVERRIDE;
54 virtual void DragUpdate(aura::Window* target, 54 virtual void DragUpdate(aura::Window* target,
55 const aura::LocatedEvent& event) OVERRIDE; 55 const aura::LocatedEvent& event) OVERRIDE;
56 virtual void Drop(aura::Window* target, 56 virtual void Drop(aura::Window* target,
57 const aura::LocatedEvent& event) OVERRIDE; 57 const aura::LocatedEvent& event) OVERRIDE;
58 virtual void DragCancel() OVERRIDE; 58 virtual void DragCancel() OVERRIDE;
59 virtual bool IsDragDropInProgress() OVERRIDE; 59 virtual bool IsDragDropInProgress() OVERRIDE;
60 virtual gfx::NativeCursor GetDragCursor() OVERRIDE;
60 61
61 // Overridden from aura::EventFilter: 62 // Overridden from aura::EventFilter:
62 virtual bool PreHandleKeyEvent(aura::Window* target, 63 virtual bool PreHandleKeyEvent(aura::Window* target,
63 aura::KeyEvent* event) OVERRIDE; 64 aura::KeyEvent* event) OVERRIDE;
64 virtual bool PreHandleMouseEvent(aura::Window* target, 65 virtual bool PreHandleMouseEvent(aura::Window* target,
65 aura::MouseEvent* event) OVERRIDE; 66 aura::MouseEvent* event) OVERRIDE;
66 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, 67 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
67 aura::TouchEvent* event) OVERRIDE; 68 aura::TouchEvent* event) OVERRIDE;
68 virtual ui::GestureStatus PreHandleGestureEvent( 69 virtual ui::GestureStatus PreHandleGestureEvent(
69 aura::Window* target, 70 aura::Window* target,
(...skipping 11 matching lines...) Expand all
81 // Helper method to start drag widget flying back animation. 82 // Helper method to start drag widget flying back animation.
82 void StartCanceledAnimation(); 83 void StartCanceledAnimation();
83 84
84 // Helper method to reset everything. 85 // Helper method to reset everything.
85 void Cleanup(); 86 void Cleanup();
86 87
87 scoped_ptr<DragImageView> drag_image_; 88 scoped_ptr<DragImageView> drag_image_;
88 gfx::Point drag_image_offset_; 89 gfx::Point drag_image_offset_;
89 const ui::OSExchangeData* drag_data_; 90 const ui::OSExchangeData* drag_data_;
90 int drag_operation_; 91 int drag_operation_;
92 gfx::NativeCursor drag_cursor_;
91 93
92 // Window that is currently under the drag cursor. 94 // Window that is currently under the drag cursor.
93 aura::Window* drag_window_; 95 aura::Window* drag_window_;
94 gfx::Point drag_start_location_; 96 gfx::Point drag_start_location_;
95 97
96 bool drag_drop_in_progress_; 98 bool drag_drop_in_progress_;
97 99
98 // Indicates whether the caller should be blocked on a drag/drop session. 100 // Indicates whether the caller should be blocked on a drag/drop session.
99 // Only be used for tests. 101 // Only be used for tests.
100 bool should_block_during_drag_drop_; 102 bool should_block_during_drag_drop_;
101 103
102 // Closure for quitting nested message loop. 104 // Closure for quitting nested message loop.
103 base::Closure quit_closure_; 105 base::Closure quit_closure_;
104 106
105 DISALLOW_COPY_AND_ASSIGN(DragDropController); 107 DISALLOW_COPY_AND_ASSIGN(DragDropController);
106 }; 108 };
107 109
108 } // namespace internal 110 } // namespace internal
109 } // namespace ash 111 } // namespace ash
110 112
111 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ 113 #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/drag_drop/drag_drop_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698