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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 | 1073 |
1074 ViewTargeter* View::GetEffectiveViewTargeter() const { | 1074 ViewTargeter* View::GetEffectiveViewTargeter() const { |
1075 DCHECK(GetWidget()); | 1075 DCHECK(GetWidget()); |
1076 ViewTargeter* view_targeter = targeter(); | 1076 ViewTargeter* view_targeter = targeter(); |
1077 if (!view_targeter) | 1077 if (!view_targeter) |
1078 view_targeter = GetWidget()->GetRootView()->targeter(); | 1078 view_targeter = GetWidget()->GetRootView()->targeter(); |
1079 CHECK(view_targeter); | 1079 CHECK(view_targeter); |
1080 return view_targeter; | 1080 return view_targeter; |
1081 } | 1081 } |
1082 | 1082 |
| 1083 WordLookupClient* View::GetWordLookupClient() { |
| 1084 return nullptr; |
| 1085 } |
| 1086 |
1083 bool View::CanAcceptEvent(const ui::Event& event) { | 1087 bool View::CanAcceptEvent(const ui::Event& event) { |
1084 return IsDrawn(); | 1088 return IsDrawn(); |
1085 } | 1089 } |
1086 | 1090 |
1087 ui::EventTarget* View::GetParentTarget() { | 1091 ui::EventTarget* View::GetParentTarget() { |
1088 return parent_; | 1092 return parent_; |
1089 } | 1093 } |
1090 | 1094 |
1091 std::unique_ptr<ui::EventTargetIterator> View::GetChildIterator() const { | 1095 std::unique_ptr<ui::EventTargetIterator> View::GetChildIterator() const { |
1092 return base::MakeUnique<ui::EventTargetIteratorImpl<View>>(children_); | 1096 return base::MakeUnique<ui::EventTargetIteratorImpl<View>>(children_); |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2418 // Message the RootView to do the drag and drop. That way if we're removed | 2422 // Message the RootView to do the drag and drop. That way if we're removed |
2419 // the RootView can detect it and avoid calling us back. | 2423 // the RootView can detect it and avoid calling us back. |
2420 gfx::Point widget_location(event.location()); | 2424 gfx::Point widget_location(event.location()); |
2421 ConvertPointToWidget(this, &widget_location); | 2425 ConvertPointToWidget(this, &widget_location); |
2422 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2426 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
2423 // WARNING: we may have been deleted. | 2427 // WARNING: we may have been deleted. |
2424 return true; | 2428 return true; |
2425 } | 2429 } |
2426 | 2430 |
2427 } // namespace views | 2431 } // namespace views |
OLD | NEW |