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

Side by Side Diff: chrome/common/native_web_keyboard_event_linux.cc

Issue 151010: A quick fix for Issue 15531 and 10953... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/native_web_keyboard_event.h ('k') | webkit/api/public/gtk/WebInputEventFactory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
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, 41 NativeWebKeyboardEvent::NativeWebKeyboardEvent(wchar_t character,
42 int state,
42 double time_stamp_seconds) 43 double time_stamp_seconds)
43 : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(character, 44 : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(character,
45 state,
44 time_stamp_seconds)), 46 time_stamp_seconds)),
45 os_event(NULL) { 47 os_event(NULL) {
46 } 48 }
47 49
48 NativeWebKeyboardEvent::NativeWebKeyboardEvent( 50 NativeWebKeyboardEvent::NativeWebKeyboardEvent(
49 const NativeWebKeyboardEvent& other) : WebKeyboardEvent(other) { 51 const NativeWebKeyboardEvent& other) : WebKeyboardEvent(other) {
50 CopyEventTo(other.os_event, &os_event); 52 CopyEventTo(other.os_event, &os_event);
51 } 53 }
52 54
53 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=( 55 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
54 const NativeWebKeyboardEvent& other) { 56 const NativeWebKeyboardEvent& other) {
55 WebKeyboardEvent::operator=(other); 57 WebKeyboardEvent::operator=(other);
56 58
57 FreeEvent(os_event); 59 FreeEvent(os_event);
58 CopyEventTo(other.os_event, &os_event); 60 CopyEventTo(other.os_event, &os_event);
59 return *this; 61 return *this;
60 } 62 }
61 63
62 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { 64 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
63 FreeEvent(os_event); 65 FreeEvent(os_event);
64 } 66 }
OLDNEW
« no previous file with comments | « chrome/common/native_web_keyboard_event.h ('k') | webkit/api/public/gtk/WebInputEventFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698