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

Side by Side Diff: content/browser/renderer_host/native_web_keyboard_event_aura.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 "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/web_input_event_aura.h" 8 #include "content/browser/renderer_host/web_input_event_aura.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 10
(...skipping 12 matching lines...) Expand all
23 (flags & ui::EF_SHIFT_DOWN ? WebKit::WebInputEvent::ShiftKey : 0) | 23 (flags & ui::EF_SHIFT_DOWN ? WebKit::WebInputEvent::ShiftKey : 0) |
24 (flags & ui::EF_CONTROL_DOWN ? WebKit::WebInputEvent::ControlKey : 0) | 24 (flags & ui::EF_CONTROL_DOWN ? WebKit::WebInputEvent::ControlKey : 0) |
25 (flags & ui::EF_CAPS_LOCK_DOWN ? WebKit::WebInputEvent::CapsLockOn : 0) | 25 (flags & ui::EF_CAPS_LOCK_DOWN ? WebKit::WebInputEvent::CapsLockOn : 0) |
26 (flags & ui::EF_ALT_DOWN ? WebKit::WebInputEvent::AltKey : 0); 26 (flags & ui::EF_ALT_DOWN ? WebKit::WebInputEvent::AltKey : 0);
27 } 27 }
28 28
29 } // namespace 29 } // namespace
30 30
31 using WebKit::WebKeyboardEvent; 31 using WebKit::WebKeyboardEvent;
32 32
33 namespace content {
34
33 NativeWebKeyboardEvent::NativeWebKeyboardEvent() 35 NativeWebKeyboardEvent::NativeWebKeyboardEvent()
34 : os_event(NULL), 36 : os_event(NULL),
35 skip_in_browser(false) { 37 skip_in_browser(false) {
36 } 38 }
37 39
38 NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event) 40 NativeWebKeyboardEvent::NativeWebKeyboardEvent(gfx::NativeEvent native_event)
39 : WebKeyboardEvent(content::MakeWebKeyboardEvent( 41 : WebKeyboardEvent(content::MakeWebKeyboardEvent(
40 static_cast<aura::KeyEvent*>(native_event))), 42 static_cast<aura::KeyEvent*>(native_event))),
41 os_event(CopyEvent(native_event)), 43 os_event(CopyEvent(native_event)),
42 skip_in_browser(false) { 44 skip_in_browser(false) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 delete os_event; 86 delete os_event;
85 os_event = CopyEvent(other.os_event); 87 os_event = CopyEvent(other.os_event);
86 skip_in_browser = other.skip_in_browser; 88 skip_in_browser = other.skip_in_browser;
87 89
88 return *this; 90 return *this;
89 } 91 }
90 92
91 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() { 93 NativeWebKeyboardEvent::~NativeWebKeyboardEvent() {
92 delete os_event; 94 delete os_event;
93 } 95 }
96
97 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698