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

Side by Side Diff: ui/events/blink/web_input_event_traits.cc

Issue 2240983003: Move |ScopedWebInputEvent| and |WebInputEventTraits| from |content::| to "ui/events/blink" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move |ScopedWebInputEvent| and |WebInputEventTraits| from |content::| to |ui::| Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
ncarter (slow) 2016/08/16 21:09:04 2016
chongz 2016/08/17 16:34:18 Done.
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/common/input/web_input_event_traits.h" 5 #include "ui/events/blink/web_input_event_traits.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 9
10 using base::StringAppendF; 10 using base::StringAppendF;
11 using base::SStringPrintf; 11 using base::SStringPrintf;
12 using blink::WebGestureEvent; 12 using blink::WebGestureEvent;
13 using blink::WebInputEvent; 13 using blink::WebInputEvent;
14 using blink::WebKeyboardEvent; 14 using blink::WebKeyboardEvent;
15 using blink::WebMouseEvent; 15 using blink::WebMouseEvent;
16 using blink::WebMouseWheelEvent; 16 using blink::WebMouseWheelEvent;
17 using blink::WebTouchEvent; 17 using blink::WebTouchEvent;
18 using blink::WebTouchPoint; 18 using blink::WebTouchPoint;
19 19
20 namespace content { 20 namespace ui {
21 namespace { 21 namespace {
22 22
23 void ApppendEventDetails(const WebKeyboardEvent& event, std::string* result) { 23 void ApppendEventDetails(const WebKeyboardEvent& event, std::string* result) {
ncarter (slow) 2016/08/16 21:09:04 ppp?
chongz 2016/08/17 16:34:18 I'm not sure what does 'ppp' mean?
24 StringAppendF(result, 24 StringAppendF(result,
25 "{\n WinCode: %d\n NativeCode: %d\n IsSystem: %d\n" 25 "{\n WinCode: %d\n NativeCode: %d\n IsSystem: %d\n"
26 " Text: %s\n UnmodifiedText: %s\n}", 26 " Text: %s\n UnmodifiedText: %s\n}",
27 event.windowsKeyCode, 27 event.windowsKeyCode,
28 event.nativeKeyCode, 28 event.nativeKeyCode,
29 event.isSystemKey, 29 event.isSystemKey,
30 reinterpret_cast<const char*>(event.text), 30 reinterpret_cast<const char*>(event.text),
31 reinterpret_cast<const char*>(event.unmodifiedText)); 31 reinterpret_cast<const char*>(event.unmodifiedText));
32 } 32 }
33 33
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 uint32_t WebInputEventTraits::GetUniqueTouchEventId( 296 uint32_t WebInputEventTraits::GetUniqueTouchEventId(
297 const WebInputEvent& event) { 297 const WebInputEvent& event) {
298 if (WebInputEvent::isTouchEventType(event.type)) { 298 if (WebInputEvent::isTouchEventType(event.type)) {
299 return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId; 299 return static_cast<const WebTouchEvent&>(event).uniqueTouchEventId;
300 } 300 }
301 return 0U; 301 return 0U;
302 } 302 }
303 303
304 } // namespace content 304 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698