Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: ui/views/view.cc

Issue 2628393003: Remove ScopedVector from ui/events/. (Closed)
Patch Set: chromeos2 Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 1151
1152 bool View::CanAcceptEvent(const ui::Event& event) { 1152 bool View::CanAcceptEvent(const ui::Event& event) {
1153 return IsDrawn(); 1153 return IsDrawn();
1154 } 1154 }
1155 1155
1156 ui::EventTarget* View::GetParentTarget() { 1156 ui::EventTarget* View::GetParentTarget() {
1157 return parent_; 1157 return parent_;
1158 } 1158 }
1159 1159
1160 std::unique_ptr<ui::EventTargetIterator> View::GetChildIterator() const { 1160 std::unique_ptr<ui::EventTargetIterator> View::GetChildIterator() const {
1161 return base::MakeUnique<ui::EventTargetIteratorImpl<View>>(children_); 1161 return base::MakeUnique<ui::EventTargetIteratorPtrImpl<View>>(children_);
1162 } 1162 }
1163 1163
1164 ui::EventTargeter* View::GetEventTargeter() { 1164 ui::EventTargeter* View::GetEventTargeter() {
1165 return targeter_.get(); 1165 return targeter_.get();
1166 } 1166 }
1167 1167
1168 void View::ConvertEventToTarget(ui::EventTarget* target, 1168 void View::ConvertEventToTarget(ui::EventTarget* target,
1169 ui::LocatedEvent* event) { 1169 ui::LocatedEvent* event) {
1170 event->ConvertLocationToTarget(this, static_cast<View*>(target)); 1170 event->ConvertLocationToTarget(this, static_cast<View*>(target));
1171 } 1171 }
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 // Message the RootView to do the drag and drop. That way if we're removed 2546 // Message the RootView to do the drag and drop. That way if we're removed
2547 // the RootView can detect it and avoid calling us back. 2547 // the RootView can detect it and avoid calling us back.
2548 gfx::Point widget_location(event.location()); 2548 gfx::Point widget_location(event.location());
2549 ConvertPointToWidget(this, &widget_location); 2549 ConvertPointToWidget(this, &widget_location);
2550 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2550 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2551 // WARNING: we may have been deleted. 2551 // WARNING: we may have been deleted.
2552 return true; 2552 return true;
2553 } 2553 }
2554 2554
2555 } // namespace views 2555 } // namespace views
OLDNEW
« ui/events/platform/platform_event_source_unittest.cc ('K') | « ui/events/test/test_event_target.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698