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

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

Issue 10917075: events: Move some files into ui/base/events/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Portions based heavily on: 5 // Portions based heavily on:
6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp 6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp
7 // 7 //
8 /* 8 /*
9 * Copyright (C) 2006-2011 Google Inc. All rights reserved. 9 * Copyright (C) 2006-2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 19 matching lines...) Expand all
30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38 #include "content/browser/renderer_host/web_input_event_aura.h" 38 #include "content/browser/renderer_host/web_input_event_aura.h"
39 39
40 #include <cstdlib>
41 #include <X11/keysym.h> 40 #include <X11/keysym.h>
42 #include <X11/Xlib.h> 41 #include <X11/Xlib.h>
43 #include <X11/Xutil.h> 42 #include <X11/Xutil.h>
43 #include <cstdlib>
44 44
45 #include "base/event_types.h" 45 #include "base/event_types.h"
46 #include "base/logging.h" 46 #include "base/logging.h"
47 #include "ui/base/event.h" 47 #include "ui/base/events/event.h"
48 #include "ui/base/events.h" 48 #include "ui/base/events/event_constants.h"
49 #include "ui/base/keycodes/keyboard_code_conversion_x.h"
49 #include "ui/base/keycodes/keyboard_codes.h" 50 #include "ui/base/keycodes/keyboard_codes.h"
50 #include "ui/base/keycodes/keyboard_code_conversion_x.h"
51 51
52 namespace content { 52 namespace content {
53 53
54 // chromium WebKit does not provide a WebInputEventFactory for X11, so we have 54 // chromium WebKit does not provide a WebInputEventFactory for X11, so we have
55 // to do the work here ourselves. 55 // to do the work here ourselves.
56 56
57 namespace { 57 namespace {
58 58
59 // This matches Firefox behavior. 59 // This matches Firefox behavior.
60 const int kPixelsPerTick = 53; 60 const int kPixelsPerTick = 53;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 476
477 // Update the type of the touch event. 477 // Update the type of the touch event.
478 web_event->type = TouchEventTypeFromEvent(event); 478 web_event->type = TouchEventTypeFromEvent(event);
479 web_event->timeStampSeconds = event->time_stamp().InSecondsF(); 479 web_event->timeStampSeconds = event->time_stamp().InSecondsF();
480 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags()); 480 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags());
481 481
482 return point; 482 return point;
483 } 483 }
484 484
485 } // namespace content 485 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/web_input_event_aura_unittest.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698