| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/common/native_web_keyboard_event.h" | 5 #include "chrome/common/native_web_keyboard_event.h" | 
| 6 | 6 | 
| 7 #include "webkit/api/public/gtk/WebInputEventFactory.h" | 7 #include "webkit/api/public/gtk/WebInputEventFactory.h" | 
| 8 | 8 | 
| 9 using WebKit::WebInputEventFactory; | 9 using WebKit::WebInputEventFactory; | 
| 10 | 10 | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31 | 31 | 
| 32 NativeWebKeyboardEvent::NativeWebKeyboardEvent() | 32 NativeWebKeyboardEvent::NativeWebKeyboardEvent() | 
| 33     : os_event(NULL) { | 33     : os_event(NULL) { | 
| 34 } | 34 } | 
| 35 | 35 | 
| 36 NativeWebKeyboardEvent::NativeWebKeyboardEvent(const GdkEventKey* native_event) | 36 NativeWebKeyboardEvent::NativeWebKeyboardEvent(const GdkEventKey* native_event) | 
| 37     : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(native_event)) { | 37     : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(native_event)) { | 
| 38   CopyEventTo(native_event, &os_event); | 38   CopyEventTo(native_event, &os_event); | 
| 39 } | 39 } | 
| 40 | 40 | 
|  | 41 NativeWebKeyboardEvent::NativeWebKeyboardEvent(wchar_t character, | 
|  | 42                                                double time_stamp_seconds) | 
|  | 43     : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(character, | 
|  | 44                                                            time_stamp_seconds)), | 
|  | 45       os_event(NULL) { | 
|  | 46 } | 
|  | 47 | 
| 41 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | 48 NativeWebKeyboardEvent::NativeWebKeyboardEvent( | 
| 42     const NativeWebKeyboardEvent& other) : WebKeyboardEvent(other) { | 49     const NativeWebKeyboardEvent& other) : WebKeyboardEvent(other) { | 
| 43   CopyEventTo(other.os_event, &os_event); | 50   CopyEventTo(other.os_event, &os_event); | 
| 44 } | 51 } | 
| 45 | 52 | 
| 46 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( | 53 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( | 
| 47     const NativeWebKeyboardEvent& other) { | 54     const NativeWebKeyboardEvent& other) { | 
| 48   WebKeyboardEvent::operator=(other); | 55   WebKeyboardEvent::operator=(other); | 
| 49 | 56 | 
| 50   FreeEvent(os_event); | 57   FreeEvent(os_event); | 
| 51   CopyEventTo(other.os_event, &os_event); | 58   CopyEventTo(other.os_event, &os_event); | 
| 52   return *this; | 59   return *this; | 
| 53 } | 60 } | 
| 54 | 61 | 
| 55 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | 62 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { | 
| 56   FreeEvent(os_event); | 63   FreeEvent(os_event); | 
| 57 } | 64 } | 
| OLD | NEW | 
|---|