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

Unified Diff: remoting/host/touch_injector_win.cc

Issue 1471043004: Convert various vector_as_array calls to vector::data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « ppapi/proxy/ppb_instance_proxy.cc ('k') | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/touch_injector_win.cc
diff --git a/remoting/host/touch_injector_win.cc b/remoting/host/touch_injector_win.cc
index 3eaadf476ef1cefdb88dbcfe27acb7cd12552aec..0607e48f461cc3dd78b98a50bc6d794634d67d5f 100644
--- a/remoting/host/touch_injector_win.cc
+++ b/remoting/host/touch_injector_win.cc
@@ -7,7 +7,6 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/native_library.h"
-#include "base/stl_util.h"
#include "remoting/proto/event.pb.h"
namespace remoting {
@@ -214,8 +213,7 @@ void TouchInjectorWin::AddNewTouchPoints(const TouchEvent& event) {
touches_in_contact_[touch_point.id()] = pointer_touch_info;
}
- if (delegate_->InjectTouchInput(touches.size(),
- vector_as_array(&touches)) == 0) {
+ if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0) {
PLOG(ERROR) << "Failed to inject a touch start event.";
}
}
@@ -235,8 +233,7 @@ void TouchInjectorWin::MoveTouchPoints(const TouchEvent& event) {
std::vector<POINTER_TOUCH_INFO> touches;
// Must inject already touching points as move events.
AppendMapValuesToVector(&touches_in_contact_, &touches);
- if (delegate_->InjectTouchInput(touches.size(),
- vector_as_array(&touches)) == 0) {
+ if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0) {
PLOG(ERROR) << "Failed to inject a touch move event.";
}
}
@@ -255,8 +252,7 @@ void TouchInjectorWin::EndTouchPoints(const TouchEvent& event) {
}
AppendMapValuesToVector(&touches_in_contact_, &touches);
- if (delegate_->InjectTouchInput(touches.size(),
- vector_as_array(&touches)) == 0) {
+ if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0) {
PLOG(ERROR) << "Failed to inject a touch end event.";
}
}
@@ -276,8 +272,7 @@ void TouchInjectorWin::CancelTouchPoints(const TouchEvent& event) {
}
AppendMapValuesToVector(&touches_in_contact_, &touches);
- if (delegate_->InjectTouchInput(touches.size(),
- vector_as_array(&touches)) == 0) {
+ if (delegate_->InjectTouchInput(touches.size(), touches.data()) == 0) {
PLOG(ERROR) << "Failed to inject a touch cancel event.";
}
}
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.cc ('k') | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698