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

Side by Side Diff: chrome/common/native_web_keyboard_event_mac.mm

Issue 6672070: Move the remaining files in chrome\common to content\common. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/common/native_web_keyboard_event.h"
6
7 #import <AppKit/AppKit.h>
8
9 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFact ory.h"
10
11 using WebKit::WebInputEventFactory;
12
13 NativeWebKeyboardEvent::NativeWebKeyboardEvent()
14 : os_event(NULL),
15 skip_in_browser(false) {
16 }
17
18 NativeWebKeyboardEvent::NativeWebKeyboardEvent(NSEvent* event)
19 : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(event)),
20 os_event([event retain]),
21 skip_in_browser(false) {
22 }
23
24 NativeWebKeyboardEvent::NativeWebKeyboardEvent(wchar_t character,
25 int modifiers,
26 double time_stamp_seconds)
27 : WebKeyboardEvent(WebInputEventFactory::keyboardEvent(character,
28 modifiers,
29 time_stamp_seconds)),
30 os_event(NULL),
31 skip_in_browser(false) {
32 }
33
34 NativeWebKeyboardEvent::NativeWebKeyboardEvent(
35 const NativeWebKeyboardEvent& other)
36 : WebKeyboardEvent(other),
37 os_event([other.os_event retain]),
38 skip_in_browser(other.skip_in_browser) {
39 }
40
41 NativeWebKeyboardEvent& NativeWebKeyboardEvent::operator=(
42 const NativeWebKeyboardEvent& other) {
43 WebKeyboardEvent::operator=(other);
44
45 NSObject* previous = os_event;
46 os_event = [other.os_event retain];
47 [previous release];
48
49 skip_in_browser = other.skip_in_browser;
50
51 return *this;
52 }
53
54 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
55 [os_event release];
56 }
OLDNEW
« no previous file with comments | « chrome/common/native_web_keyboard_event_linux.cc ('k') | chrome/common/native_web_keyboard_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698