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

Side by Side Diff: content/browser/renderer_host/native_web_keyboard_event_gtk.cc

Issue 10383239: Move NativeWebKeyboardEvent to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 7 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
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/public/browser/native_web_keyboard_event.h" 5 #include "content/public/browser/native_web_keyboard_event.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 8
9 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFact ory.h"
10 10
11 using WebKit::WebInputEventFactory; 11 using WebKit::WebInputEventFactory;
12 12
13 namespace { 13 namespace {
14 14
15 void CopyEventTo(gfx::NativeEvent in, gfx::NativeEvent* out) { 15 void CopyEventTo(gfx::NativeEvent in, gfx::NativeEvent* out) {
16 *out = in ? gdk_event_copy(in) : NULL; 16 *out = in ? gdk_event_copy(in) : NULL;
17 } 17 }
18 18
19 void FreeEvent(gfx::NativeEvent event) { 19 void FreeEvent(gfx::NativeEvent event) {
20 if (event) 20 if (event)
21 gdk_event_free(event); 21 gdk_event_free(event);
22 } 22 }
23 23
24 } // namespace 24 } // namespace
25 25
26 namespace content {
26 27
27 NativeWebKeyboardEvent::NativeWebKeyboardEvent() 28 NativeWebKeyboardEvent::NativeWebKeyboardEvent()
28 : os_event(NULL), 29 : os_event(NULL),
29 skip_in_browser(false), 30 skip_in_browser(false),
30 match_edit_command(false) { 31 match_edit_command(false) {
31 } 32 }
32 33
33 NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event) 34 NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event)
34 : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(&native_event->key)), 35 : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(&native_event->key)),
35 skip_in_browser(false), 36 skip_in_browser(false),
(...skipping 29 matching lines...) Expand all
65 66
66 skip_in_browser = other.skip_in_browser; 67 skip_in_browser = other.skip_in_browser;
67 match_edit_command = other.match_edit_command; 68 match_edit_command = other.match_edit_command;
68 69
69 return *this; 70 return *this;
70 } 71 }
71 72
72 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { 73 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
73 FreeEvent(os_event); 74 FreeEvent(os_event);
74 } 75 }
76
77 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698