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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
6 | 6 |
7 #include "ui/views/view.h" | 7 #include "ui/views/view.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 } | 1048 } |
1049 | 1049 |
1050 bool View::CanAcceptEvent(const ui::Event& event) { | 1050 bool View::CanAcceptEvent(const ui::Event& event) { |
1051 return IsDrawn(); | 1051 return IsDrawn(); |
1052 } | 1052 } |
1053 | 1053 |
1054 ui::EventTarget* View::GetParentTarget() { | 1054 ui::EventTarget* View::GetParentTarget() { |
1055 return parent_; | 1055 return parent_; |
1056 } | 1056 } |
1057 | 1057 |
1058 scoped_ptr<ui::EventTargetIterator> View::GetChildIterator() const { | 1058 scoped_ptr<ui::EventTargetIterator> View::GetChildIterator() { |
1059 return scoped_ptr<ui::EventTargetIterator>( | 1059 return scoped_ptr<ui::EventTargetIterator>( |
1060 new ui::EventTargetIteratorImpl<View>(children_)); | 1060 new ui::EventTargetIteratorImpl<View>(children_)); |
1061 } | 1061 } |
1062 | 1062 |
1063 ui::EventTargeter* View::GetEventTargeter() { | 1063 ui::EventTargeter* View::GetEventTargeter() { |
1064 return targeter_.get(); | 1064 return targeter_.get(); |
1065 } | 1065 } |
1066 | 1066 |
1067 void View::ConvertEventToTarget(ui::EventTarget* target, | 1067 void View::ConvertEventToTarget(ui::EventTarget* target, |
1068 ui::LocatedEvent* event) { | 1068 ui::LocatedEvent* event) { |
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2456 // Message the RootView to do the drag and drop. That way if we're removed | 2456 // Message the RootView to do the drag and drop. That way if we're removed |
2457 // the RootView can detect it and avoid calling us back. | 2457 // the RootView can detect it and avoid calling us back. |
2458 gfx::Point widget_location(event.location()); | 2458 gfx::Point widget_location(event.location()); |
2459 ConvertPointToWidget(this, &widget_location); | 2459 ConvertPointToWidget(this, &widget_location); |
2460 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2460 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
2461 // WARNING: we may have been deleted. | 2461 // WARNING: we may have been deleted. |
2462 return true; | 2462 return true; |
2463 } | 2463 } |
2464 | 2464 |
2465 } // namespace views | 2465 } // namespace views |
OLD | NEW |