OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/devtools/protocol/input_handler.h" | 5 #include "content/browser/devtools/protocol/input_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 callback->sendSuccess(); | 173 callback->sendSuccess(); |
174 } else { | 174 } else { |
175 callback->sendFailure(Response::Error( | 175 callback->sendFailure(Response::Error( |
176 base::StringPrintf("Synthetic scroll failed, result was %d", result))); | 176 base::StringPrintf("Synthetic scroll failed, result was %d", result))); |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 } // namespace | 180 } // namespace |
181 | 181 |
182 InputHandler::InputHandler() | 182 InputHandler::InputHandler() |
183 : host_(NULL), | 183 : DevToolsDomainHandler(Input::Metainfo::domainName), |
| 184 host_(nullptr), |
184 page_scale_factor_(1.0), | 185 page_scale_factor_(1.0), |
185 last_id_(0), | 186 last_id_(0), |
186 weak_factory_(this) { | 187 weak_factory_(this) { |
187 } | 188 } |
188 | 189 |
189 InputHandler::~InputHandler() { | 190 InputHandler::~InputHandler() { |
190 } | 191 } |
191 | 192 |
192 void InputHandler::SetRenderFrameHost(RenderFrameHostImpl* host) { | 193 void InputHandler::SetRenderFrameHost(RenderFrameHostImpl* host) { |
193 host_ = host; | 194 host_ = host; |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 for (int i = 0; i < count; i++) { | 534 for (int i = 0; i < count; i++) { |
534 host_->GetRenderWidgetHost()->QueueSyntheticGesture( | 535 host_->GetRenderWidgetHost()->QueueSyntheticGesture( |
535 SyntheticGesture::Create(gesture_params), | 536 SyntheticGesture::Create(gesture_params), |
536 base::Bind(&TapGestureResponse::OnGestureResult, | 537 base::Bind(&TapGestureResponse::OnGestureResult, |
537 base::Unretained(response))); | 538 base::Unretained(response))); |
538 } | 539 } |
539 } | 540 } |
540 | 541 |
541 } // namespace protocol | 542 } // namespace protocol |
542 } // namespace content | 543 } // namespace content |
OLD | NEW |