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

Side by Side Diff: ui/aura/window.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 #include "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 ui::EventTarget* Window::GetParentTarget() { 1089 ui::EventTarget* Window::GetParentTarget() {
1090 if (IsRootWindow()) { 1090 if (IsRootWindow()) {
1091 return client::GetEventClient(this) ? 1091 return client::GetEventClient(this) ?
1092 client::GetEventClient(this)->GetToplevelEventTarget() : 1092 client::GetEventClient(this)->GetToplevelEventTarget() :
1093 Env::GetInstance(); 1093 Env::GetInstance();
1094 } 1094 }
1095 return parent_; 1095 return parent_;
1096 } 1096 }
1097 1097
1098 std::unique_ptr<ui::EventTargetIterator> Window::GetChildIterator() const { 1098 std::unique_ptr<ui::EventTargetIterator> Window::GetChildIterator() const {
1099 return base::MakeUnique<ui::EventTargetIteratorImpl<Window>>(children()); 1099 return base::MakeUnique<ui::EventTargetIteratorPtrImpl<Window>>(children());
1100 } 1100 }
1101 1101
1102 ui::EventTargeter* Window::GetEventTargeter() { 1102 ui::EventTargeter* Window::GetEventTargeter() {
1103 return targeter_.get(); 1103 return targeter_.get();
1104 } 1104 }
1105 1105
1106 void Window::ConvertEventToTarget(ui::EventTarget* target, 1106 void Window::ConvertEventToTarget(ui::EventTarget* target,
1107 ui::LocatedEvent* event) { 1107 ui::LocatedEvent* event) {
1108 event->ConvertLocationToTarget(this, 1108 event->ConvertLocationToTarget(this,
1109 static_cast<Window*>(target)); 1109 static_cast<Window*>(target));
1110 } 1110 }
1111 1111
1112 void Window::UpdateLayerName() { 1112 void Window::UpdateLayerName() {
1113 #if !defined(NDEBUG) 1113 #if !defined(NDEBUG)
1114 DCHECK(layer()); 1114 DCHECK(layer());
1115 1115
1116 std::string layer_name(GetName()); 1116 std::string layer_name(GetName());
1117 if (layer_name.empty()) 1117 if (layer_name.empty())
1118 layer_name = "Unnamed Window"; 1118 layer_name = "Unnamed Window";
1119 1119
1120 if (id_ != -1) 1120 if (id_ != -1)
1121 layer_name += " " + base::IntToString(id_); 1121 layer_name += " " + base::IntToString(id_);
1122 1122
1123 layer()->set_name(layer_name); 1123 layer()->set_name(layer_name);
1124 #endif 1124 #endif
1125 } 1125 }
1126 1126
1127 } // namespace aura 1127 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher.h » ('j') | ui/events/gesture_detection/motion_event_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698