| 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 #ifndef ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ | 5 #ifndef ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ |
| 6 #define ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ | 6 #define ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
| 12 | 12 |
| 13 namespace aura { | 13 namespace aura { |
| 14 class RootWindow; | |
| 15 class Window; | 14 class Window; |
| 16 class WindowDelegate; | 15 class WindowDelegate; |
| 17 } | 16 } |
| 18 | 17 |
| 19 namespace ash { | 18 namespace ash { |
| 20 namespace internal { | 19 namespace internal { |
| 21 | 20 |
| 22 // Provides functions for handling drag events inside and outside the root | 21 // Provides functions for handling drag events inside and outside the root |
| 23 // window where drag is started. This internally sets up a capture window for | 22 // window where drag is started. This internally sets up a capture window for |
| 24 // tracking drag events outside the root window where drag is initiated. | 23 // tracking drag events outside the root window where drag is initiated. |
| 25 // ash/wm/coordinate_conversion.h is used internally and only X11 environment | 24 // ash/wm/coordinate_conversion.h is used internally and only X11 environment |
| 26 // is supported for now. | 25 // is supported for now. |
| 27 class ASH_EXPORT DragDropTracker { | 26 class ASH_EXPORT DragDropTracker { |
| 28 public: | 27 public: |
| 29 DragDropTracker(aura::RootWindow* context_root, | 28 DragDropTracker(aura::Window* context_root, |
| 30 aura::WindowDelegate* delegate); | 29 aura::WindowDelegate* delegate); |
| 31 ~DragDropTracker(); | 30 ~DragDropTracker(); |
| 32 | 31 |
| 33 aura::Window* capture_window() { return capture_window_.get(); } | 32 aura::Window* capture_window() { return capture_window_.get(); } |
| 34 | 33 |
| 35 // Tells our |capture_window_| to take capture. This is not done right at | 34 // Tells our |capture_window_| to take capture. This is not done right at |
| 36 // creation to give the caller a chance to perform any operations needed | 35 // creation to give the caller a chance to perform any operations needed |
| 37 // before the capture is transfered. | 36 // before the capture is transfered. |
| 38 void TakeCapture(); | 37 void TakeCapture(); |
| 39 | 38 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 51 // A window for capturing drag events while dragging. | 50 // A window for capturing drag events while dragging. |
| 52 scoped_ptr<aura::Window> capture_window_; | 51 scoped_ptr<aura::Window> capture_window_; |
| 53 | 52 |
| 54 DISALLOW_COPY_AND_ASSIGN(DragDropTracker); | 53 DISALLOW_COPY_AND_ASSIGN(DragDropTracker); |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 } // namespace internal | 56 } // namespace internal |
| 58 } // namespace ash | 57 } // namespace ash |
| 59 | 58 |
| 60 #endif // ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ | 59 #endif // ASH_DRAG_DROP_DRAG_DROP_TRACKER_H_ |
| OLD | NEW |