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 "ash/drag_drop/drag_drop_controller.h" | 5 #include "ash/drag_drop/drag_drop_controller.h" |
6 | 6 |
7 #include "ash/drag_drop/drag_drop_tracker.h" | 7 #include "ash/drag_drop/drag_drop_tracker.h" |
8 #include "ash/drag_drop/drag_image_view.h" | 8 #include "ash/drag_drop/drag_image_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 bool ShouldDescendIntoChildForEventHandling( | 98 bool ShouldDescendIntoChildForEventHandling( |
99 aura::Window* child, | 99 aura::Window* child, |
100 const gfx::Point& location) override { | 100 const gfx::Point& location) override { |
101 return true; | 101 return true; |
102 } | 102 } |
103 bool CanFocus() override { return true; } | 103 bool CanFocus() override { return true; } |
104 void OnCaptureLost() override { | 104 void OnCaptureLost() override { |
105 if (drag_drop_controller_->IsDragDropInProgress()) | 105 if (drag_drop_controller_->IsDragDropInProgress()) |
106 drag_drop_controller_->DragCancel(); | 106 drag_drop_controller_->DragCancel(); |
107 } | 107 } |
108 void OnPaint(gfx::Canvas* canvas) override {} | 108 void OnPaint(const ui::PaintContext& context) override {} |
109 void OnDeviceScaleFactorChanged(float device_scale_factor) override {} | 109 void OnDeviceScaleFactorChanged(float device_scale_factor) override {} |
110 void OnWindowDestroying(aura::Window* window) override {} | 110 void OnWindowDestroying(aura::Window* window) override {} |
111 void OnWindowDestroyed(aura::Window* window) override {} | 111 void OnWindowDestroyed(aura::Window* window) override {} |
112 void OnWindowTargetVisibilityChanged(bool visible) override {} | 112 void OnWindowTargetVisibilityChanged(bool visible) override {} |
113 bool HasHitTestMask() const override { return true; } | 113 bool HasHitTestMask() const override { return true; } |
114 void GetHitTestMask(gfx::Path* mask) const override { | 114 void GetHitTestMask(gfx::Path* mask) const override { |
115 DCHECK(mask->isEmpty()); | 115 DCHECK(mask->isEmpty()); |
116 } | 116 } |
117 | 117 |
118 private: | 118 private: |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 if (drag_window_) | 561 if (drag_window_) |
562 drag_window_->RemoveObserver(this); | 562 drag_window_->RemoveObserver(this); |
563 drag_window_ = NULL; | 563 drag_window_ = NULL; |
564 drag_data_ = NULL; | 564 drag_data_ = NULL; |
565 // Cleanup can be called again while deleting DragDropTracker, so delete | 565 // Cleanup can be called again while deleting DragDropTracker, so delete |
566 // the pointer with a local variable to avoid double free. | 566 // the pointer with a local variable to avoid double free. |
567 scoped_ptr<ash::DragDropTracker> holder = drag_drop_tracker_.Pass(); | 567 scoped_ptr<ash::DragDropTracker> holder = drag_drop_tracker_.Pass(); |
568 } | 568 } |
569 | 569 |
570 } // namespace ash | 570 } // namespace ash |
OLD | NEW |