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

Unified Diff: components/mus/ws/event_dispatcher.cc

Issue 1906623003: Convert //components/mus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/event_dispatcher.h ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/event_dispatcher.cc
diff --git a/components/mus/ws/event_dispatcher.cc b/components/mus/ws/event_dispatcher.cc
index 7dce130a2d57038272214239f960ddf0458a1547..fd97ee1649207ee17f27d796229fbafd29219092 100644
--- a/components/mus/ws/event_dispatcher.cc
+++ b/components/mus/ws/event_dispatcher.cc
@@ -178,7 +178,7 @@ void EventDispatcher::UpdateCursorProviderByLastKnownLocation() {
bool EventDispatcher::AddAccelerator(uint32_t id,
mojom::EventMatcherPtr event_matcher) {
- scoped_ptr<Accelerator> accelerator(new Accelerator(id, *event_matcher));
+ std::unique_ptr<Accelerator> accelerator(new Accelerator(id, *event_matcher));
// If an accelerator with the same id or matcher already exists, then abort.
for (const auto& pair : accelerators_) {
if (pair.first == id || accelerator->EqualEventMatcher(pair.second.get()))
@@ -386,7 +386,7 @@ void EventDispatcher::DispatchToPointerTarget(const PointerTarget& target,
gfx::Point location(event.location());
gfx::Transform transform(GetTransformToWindow(surface_id_, target.window));
transform.TransformPoint(&location);
- scoped_ptr<ui::Event> clone = ui::Event::Clone(event);
+ std::unique_ptr<ui::Event> clone = ui::Event::Clone(event);
clone->AsLocatedEvent()->set_location(location);
// TODO(jonross): add post-target accelerator support once accelerators
// support pointer events.
« no previous file with comments | « components/mus/ws/event_dispatcher.h ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698