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

Side by Side Diff: content/browser/devtools/protocol/input_handler.cc

Issue 2143113003: [DevTools] Set skip_in_browser=true for synthethic keyboard events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 const std::string* unmodified_text, 159 const std::string* unmodified_text,
160 const std::string* key_identifier, 160 const std::string* key_identifier,
161 const std::string* code, 161 const std::string* code,
162 const std::string* key, 162 const std::string* key,
163 const int* windows_virtual_key_code, 163 const int* windows_virtual_key_code,
164 const int* native_virtual_key_code, 164 const int* native_virtual_key_code,
165 const bool* auto_repeat, 165 const bool* auto_repeat,
166 const bool* is_keypad, 166 const bool* is_keypad,
167 const bool* is_system_key) { 167 const bool* is_system_key) {
168 NativeWebKeyboardEvent event; 168 NativeWebKeyboardEvent event;
169 event.skip_in_browser = true;
169 170
170 if (type == dispatch_key_event::kTypeKeyDown) { 171 if (type == dispatch_key_event::kTypeKeyDown) {
171 event.type = blink::WebInputEvent::KeyDown; 172 event.type = blink::WebInputEvent::KeyDown;
172 } else if (type == dispatch_key_event::kTypeKeyUp) { 173 } else if (type == dispatch_key_event::kTypeKeyUp) {
173 event.type = blink::WebInputEvent::KeyUp; 174 event.type = blink::WebInputEvent::KeyUp;
174 } else if (type == dispatch_key_event::kTypeChar) { 175 } else if (type == dispatch_key_event::kTypeChar) {
175 event.type = blink::WebInputEvent::Char; 176 event.type = blink::WebInputEvent::Char;
176 } else if (type == dispatch_key_event::kTypeRawKeyDown) { 177 } else if (type == dispatch_key_event::kTypeRawKeyDown) {
177 event.type = blink::WebInputEvent::RawKeyDown; 178 event.type = blink::WebInputEvent::RawKeyDown;
178 } else { 179 } else {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 } else { 509 } else {
509 client_->SendError(command_id, 510 client_->SendError(command_id,
510 Response::InternalError(base::StringPrintf( 511 Response::InternalError(base::StringPrintf(
511 "Synthetic tap failed, result was %d", result))); 512 "Synthetic tap failed, result was %d", result)));
512 } 513 }
513 } 514 }
514 515
515 } // namespace input 516 } // namespace input
516 } // namespace devtools 517 } // namespace devtools
517 } // namespace content 518 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | third_party/WebKit/Source/devtools/front_end/Tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698