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

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

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge removal of compact nav. Created 9 years, 2 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/browser/ui/views/tab_contents/tab_contents_container_native.cc ('k') | ui/aura/aura.gyp » ('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 "chrome/common/native_web_keyboard_event_views.h" 5 #include "chrome/common/native_web_keyboard_event_views.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 unmodifiedText[0] = event.GetUnmodifiedCharacter(); 42 unmodifiedText[0] = event.GetUnmodifiedCharacter();
43 setKeyIdentifierFromWindowsKeyCode(); 43 setKeyIdentifierFromWindowsKeyCode();
44 44
45 #if defined(USE_AURA) 45 #if defined(USE_AURA)
46 // TODO(beng): 46 // TODO(beng):
47 NOTIMPLEMENTED(); 47 NOTIMPLEMENTED();
48 #elif defined(OS_WIN) 48 #elif defined(OS_WIN)
49 // |os_event| is a MSG struct, so we can copy it directly. 49 // |os_event| is a MSG struct, so we can copy it directly.
50 os_event = event.native_event(); 50 os_event = event.native_event();
51 #elif defined(TOOLKIT_USES_GTK) 51 #elif defined(TOOLKIT_USES_GTK)
52 if (event.native_event()) { 52 if (event.gdk_event()) {
53 os_event = 53 os_event =
54 reinterpret_cast<GdkEventKey*>(gdk_event_copy(event.native_event())); 54 reinterpret_cast<GdkEventKey*>(gdk_event_copy(event.gdk_event()));
55 nativeKeyCode = os_event->keyval; 55 nativeKeyCode = os_event->keyval;
56 } else { 56 } else {
57 os_event = NULL; 57 os_event = NULL;
58 } 58 }
59 #endif 59 #endif
60 60
61 #if defined(TOOLKIT_USES_GTK) 61 #if defined(TOOLKIT_USES_GTK)
62 match_edit_command = false; 62 match_edit_command = false;
63 #endif 63 #endif
64 } 64 }
(...skipping 20 matching lines...) Expand all
85 os_event = NULL; 85 os_event = NULL;
86 #endif 86 #endif
87 87
88 #if defined(TOOLKIT_USES_GTK) 88 #if defined(TOOLKIT_USES_GTK)
89 match_edit_command = false; 89 match_edit_command = false;
90 #endif 90 #endif
91 } 91 }
92 92
93 NativeWebKeyboardEventViews::~NativeWebKeyboardEventViews() { 93 NativeWebKeyboardEventViews::~NativeWebKeyboardEventViews() {
94 } 94 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_container_native.cc ('k') | ui/aura/aura.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698