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

Unified Diff: content/renderer/input/input_event_filter.cc

Issue 1873783003: Convert //content/renderer 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 | « content/renderer/input/input_event_filter.h ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_event_filter.cc
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index 543e62a4c1babf2de5f7034690a8a3a36da80159..e62ee2cf941c784c96db901db93940ae26ccb648 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -9,6 +9,7 @@
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
@@ -77,12 +78,12 @@ void InputEventFilter::DidOverscroll(int routing_id,
return;
}
- SendMessage(scoped_ptr<IPC::Message>(
+ SendMessage(std::unique_ptr<IPC::Message>(
new InputHostMsg_DidOverscroll(routing_id, params)));
}
void InputEventFilter::DidStopFlinging(int routing_id) {
- SendMessage(make_scoped_ptr(new InputHostMsg_DidStopFlinging(routing_id)));
+ SendMessage(base::WrapUnique(new InputHostMsg_DidStopFlinging(routing_id)));
}
void InputEventFilter::NotifyInputEventHandled(
@@ -170,8 +171,8 @@ void InputEventFilter::ForwardToHandler(const IPC::Message& message) {
// Intercept |DidOverscroll| notifications, bundling any triggered overscroll
// response with the input event ack.
- scoped_ptr<DidOverscrollParams> overscroll_params;
- base::AutoReset<scoped_ptr<DidOverscrollParams>*>
+ std::unique_ptr<DidOverscrollParams> overscroll_params;
+ base::AutoReset<std::unique_ptr<DidOverscrollParams>*>
auto_reset_current_overscroll_params(
&current_overscroll_params_, send_ack ? &overscroll_params : NULL);
@@ -192,11 +193,11 @@ void InputEventFilter::ForwardToHandler(const IPC::Message& message) {
InputEventAck ack(event->type, ack_state, latency_info,
std::move(overscroll_params),
WebInputEventTraits::GetUniqueTouchEventId(*event));
- SendMessage(scoped_ptr<IPC::Message>(
+ SendMessage(std::unique_ptr<IPC::Message>(
new InputHostMsg_HandleInputEvent_ACK(routing_id, ack)));
}
-void InputEventFilter::SendMessage(scoped_ptr<IPC::Message> message) {
+void InputEventFilter::SendMessage(std::unique_ptr<IPC::Message> message) {
DCHECK(target_task_runner_->BelongsToCurrentThread());
io_task_runner_->PostTask(
@@ -204,7 +205,8 @@ void InputEventFilter::SendMessage(scoped_ptr<IPC::Message> message) {
base::Passed(&message)));
}
-void InputEventFilter::SendMessageOnIOThread(scoped_ptr<IPC::Message> message) {
+void InputEventFilter::SendMessageOnIOThread(
+ std::unique_ptr<IPC::Message> message) {
DCHECK(io_task_runner_->BelongsToCurrentThread());
if (!sender_)
« no previous file with comments | « content/renderer/input/input_event_filter.h ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698