| 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 "content/browser/renderer_host/web_input_event_aura.h" | 8 #include "content/browser/renderer_host/web_input_event_aura.h" |
| 9 #include "ui/events/base_event_utils.h" | 9 #include "ui/events/base_event_utils.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 default: | 78 default: |
| 79 NOTREACHED(); | 79 NOTREACHED(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 modifiers = EventFlagsToWebInputEventModifiers(state); | 82 modifiers = EventFlagsToWebInputEventModifiers(state); |
| 83 timeStampSeconds = time_stamp_seconds; | 83 timeStampSeconds = time_stamp_seconds; |
| 84 windowsKeyCode = character; | 84 windowsKeyCode = character; |
| 85 nativeKeyCode = character; | 85 nativeKeyCode = character; |
| 86 text[0] = character; | 86 text[0] = character; |
| 87 unmodifiedText[0] = character; | 87 unmodifiedText[0] = character; |
| 88 isSystemKey = | 88 isSystemKey = ui::IsSystemKeyModifier(state); |
| 89 ui::IsSystemKeyModifier(state) && (state & ui::EF_ALTGR_DOWN) == 0; | |
| 90 setKeyIdentifierFromWindowsKeyCode(); | 89 setKeyIdentifierFromWindowsKeyCode(); |
| 91 } | 90 } |
| 92 | 91 |
| 93 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( | 92 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( |
| 94 const NativeWebKeyboardEvent& other) { | 93 const NativeWebKeyboardEvent& other) { |
| 95 WebKeyboardEvent::operator=(other); | 94 WebKeyboardEvent::operator=(other); |
| 96 delete os_event; | 95 delete os_event; |
| 97 os_event = CopyEvent(other.os_event); | 96 os_event = CopyEvent(other.os_event); |
| 98 skip_in_browser = other.skip_in_browser; | 97 skip_in_browser = other.skip_in_browser; |
| 99 match_edit_command = other.match_edit_command; | 98 match_edit_command = other.match_edit_command; |
| 100 return *this; | 99 return *this; |
| 101 } | 100 } |
| 102 | 101 |
| 103 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | 102 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { |
| 104 delete os_event; | 103 delete os_event; |
| 105 } | 104 } |
| 106 | 105 |
| 107 } // namespace content | 106 } // namespace content |
| OLD | NEW |