| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/public/browser/native_web_keyboard_event.h" | 5 #include "content/public/browser/native_web_keyboard_event.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/events/base_event_utils.h" | 8 #include "ui/events/base_event_utils.h" |
| 9 #include "ui/events/blink/web_input_event.h" | 9 #include "ui/events/blink/web_input_event.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 : WebKeyboardEvent(other), | 53 : WebKeyboardEvent(other), |
| 54 os_event(CopyEvent(other.os_event)), | 54 os_event(CopyEvent(other.os_event)), |
| 55 skip_in_browser(other.skip_in_browser) { | 55 skip_in_browser(other.skip_in_browser) { |
| 56 } | 56 } |
| 57 | 57 |
| 58 NativeWebKeyboardEvent::NativeWebKeyboardEvent(const ui::KeyEvent& key_event, | 58 NativeWebKeyboardEvent::NativeWebKeyboardEvent(const ui::KeyEvent& key_event, |
| 59 base::char16 character) | 59 base::char16 character) |
| 60 : WebKeyboardEvent(ui::MakeWebKeyboardEvent(key_event)), | 60 : WebKeyboardEvent(ui::MakeWebKeyboardEvent(key_event)), |
| 61 os_event(nullptr), | 61 os_event(nullptr), |
| 62 skip_in_browser(false) { | 62 skip_in_browser(false) { |
| 63 type = blink::WebInputEvent::Char; | 63 m_type = blink::WebInputEvent::Char; |
| 64 windowsKeyCode = character; | 64 windowsKeyCode = character; |
| 65 text[0] = character; | 65 text[0] = character; |
| 66 unmodifiedText[0] = character; | 66 unmodifiedText[0] = character; |
| 67 } | 67 } |
| 68 | 68 |
| 69 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( | 69 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( |
| 70 const NativeWebKeyboardEvent& other) { | 70 const NativeWebKeyboardEvent& other) { |
| 71 WebKeyboardEvent::operator=(other); | 71 WebKeyboardEvent::operator=(other); |
| 72 delete os_event; | 72 delete os_event; |
| 73 os_event = CopyEvent(other.os_event); | 73 os_event = CopyEvent(other.os_event); |
| 74 skip_in_browser = other.skip_in_browser; | 74 skip_in_browser = other.skip_in_browser; |
| 75 return *this; | 75 return *this; |
| 76 } | 76 } |
| 77 | 77 |
| 78 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | 78 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { |
| 79 delete os_event; | 79 delete os_event; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace content | 82 } // namespace content |
| OLD | NEW |