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

Side by Side Diff: content/common/native_web_keyboard_event_views.cc

Issue 7006006: Replace OS_LINUX ifdefs with OS_POSIX & !OS_MACOSX, TOOLKIT_USES_GTK, or (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 6 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 | « content/common/native_web_keyboard_event.h ('k') | content/gpu/gpu_child_thread.cc » ('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) 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/common/native_web_keyboard_event.h" 5 #include "content/common/native_web_keyboard_event.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gdk/gdk.h> 8 #include <gdk/gdk.h>
9 #endif 9 #endif
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #elif defined(TOOLKIT_USES_GTK) 48 #elif defined(TOOLKIT_USES_GTK)
49 if (event.native_event()) { 49 if (event.native_event()) {
50 os_event = 50 os_event =
51 reinterpret_cast<GdkEventKey*>(gdk_event_copy(event.native_event())); 51 reinterpret_cast<GdkEventKey*>(gdk_event_copy(event.native_event()));
52 nativeKeyCode = os_event->keyval; 52 nativeKeyCode = os_event->keyval;
53 } else { 53 } else {
54 os_event = NULL; 54 os_event = NULL;
55 } 55 }
56 #endif 56 #endif
57 57
58 #if defined(OS_LINUX) 58 #if defined(TOOLKIT_USES_GTK)
59 match_edit_command = false; 59 match_edit_command = false;
60 #endif 60 #endif
61 } 61 }
62 62
63 NativeWebKeyboardEvent::NativeWebKeyboardEvent(uint16 character, 63 NativeWebKeyboardEvent::NativeWebKeyboardEvent(uint16 character,
64 int flags, 64 int flags,
65 double time_stamp_seconds, 65 double time_stamp_seconds,
66 FromViewsEvent) 66 FromViewsEvent)
67 : skip_in_browser(true) { 67 : skip_in_browser(true) {
68 type = WebKit::WebInputEvent::Char; 68 type = WebKit::WebInputEvent::Char;
69 modifiers = ViewsFlagsToWebInputEventModifiers(flags); 69 modifiers = ViewsFlagsToWebInputEventModifiers(flags);
70 timeStampSeconds = time_stamp_seconds; 70 timeStampSeconds = time_stamp_seconds;
71 windowsKeyCode = character; 71 windowsKeyCode = character;
72 nativeKeyCode = character; 72 nativeKeyCode = character;
73 text[0] = character; 73 text[0] = character;
74 unmodifiedText[0] = character; 74 unmodifiedText[0] = character;
75 isSystemKey = (flags & ui::EF_ALT_DOWN) != 0; 75 isSystemKey = (flags & ui::EF_ALT_DOWN) != 0;
76 76
77 #if defined(OS_WIN) 77 #if defined(OS_WIN)
78 memset(&os_event, 0, sizeof(os_event)); 78 memset(&os_event, 0, sizeof(os_event));
79 #elif defined(TOOLKIT_USES_GTK) 79 #elif defined(TOOLKIT_USES_GTK)
80 os_event = NULL; 80 os_event = NULL;
81 #endif 81 #endif
82 82
83 #if defined(OS_LINUX) 83 #if defined(TOOLKIT_USES_GTK)
84 match_edit_command = false; 84 match_edit_command = false;
85 #endif 85 #endif
86 } 86 }
OLDNEW
« no previous file with comments | « content/common/native_web_keyboard_event.h ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698