| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/views/root_view_drop_target.h" | 5 #include "chrome/views/root_view_drop_target.h" |
| 6 | 6 |
| 7 #include "base/gfx/point.h" | 7 #include "base/gfx/point.h" |
| 8 #include "base/logging.h" | |
| 9 #include "chrome/common/drag_drop_types.h" | 8 #include "chrome/common/drag_drop_types.h" |
| 10 #include "chrome/views/root_view.h" | 9 #include "chrome/views/root_view.h" |
| 11 #include "chrome/views/widget.h" | 10 #include "chrome/views/widget.h" |
| 12 | 11 |
| 13 namespace views { | 12 namespace views { |
| 14 | 13 |
| 15 RootViewDropTarget::RootViewDropTarget(RootView* root_view) | 14 RootViewDropTarget::RootViewDropTarget(RootView* root_view) |
| 16 : BaseDropTarget(root_view->GetWidget()->GetNativeView()), | 15 : BaseDropTarget(root_view->GetWidget()->GetNativeView()), |
| 17 root_view_(root_view), | 16 root_view_(root_view), |
| 18 target_view_(NULL), | 17 target_view_(NULL), |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // drop. | 109 // drop. |
| 111 deepest_view_ = view; | 110 deepest_view_ = view; |
| 112 while (view && view != target_view_ && | 111 while (view && view != target_view_ && |
| 113 (!view->IsEnabled() || !view->CanDrop(data))) { | 112 (!view->IsEnabled() || !view->CanDrop(data))) { |
| 114 view = view->GetParent(); | 113 view = view->GetParent(); |
| 115 } | 114 } |
| 116 return view; | 115 return view; |
| 117 } | 116 } |
| 118 | 117 |
| 119 } // namespace views | 118 } // namespace views |
| OLD | NEW |