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

Unified Diff: views/events/event_aura.cc

Issue 7741001: Add Aura support to views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/desktop/desktop_window_view.cc ('k') | views/focus/focus_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/events/event_aura.cc
===================================================================
--- views/events/event_aura.cc (revision 0)
+++ views/events/event_aura.cc (revision 0)
@@ -0,0 +1,127 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "views/events/event.h"
+
+#include "base/logging.h"
+
+namespace views {
+
+namespace {
+
+int GetKeyStateFlags() {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+ui::EventType EventTypeFromNative(NativeEvent native_event) {
+ NOTIMPLEMENTED();
+ return ui::ET_UNKNOWN;
+}
+
+int EventFlagsFromNative(NativeEvent native_event) {
+ NOTIMPLEMENTED();
+ return 0;
+}
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Event, private:
+
+void Event::Init() {
+}
+
+void Event::InitWithNativeEvent(NativeEvent native_event) {
+ native_event_ = native_event;
+ // TODO(beng): remove once we rid views of Gtk/Gdk.
+ native_event_2_ = NULL;
+}
+
+void Event::InitWithNativeEvent2(NativeEvent2 native_event_2,
+ FromNativeEvent2) {
+ // No one should ever call this on Aura.
+ // TODO(beng): remove once we rid views of Gtk/Gdk.
+ NOTREACHED();
+ native_event_2_ = NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// LocatedEvent, protected:
+
+LocatedEvent::LocatedEvent(NativeEvent native_event)
+ : Event(native_event, EventTypeFromNative(native_event),
+ EventFlagsFromNative(native_event)),
+ location_(0, 0 /* TODO(beng): obtain */) {
+}
+
+LocatedEvent::LocatedEvent(NativeEvent2 native_event_2,
+ FromNativeEvent2 from_native)
+ : Event(native_event_2, ui::ET_UNKNOWN, 0, from_native) {
+ // No one should ever call this on Windows.
+ // TODO(msw): remove once we rid views of Gtk/Gdk.
+ NOTREACHED();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// KeyEvent, public:
+
+KeyEvent::KeyEvent(NativeEvent native_event)
+ : Event(native_event,
+ EventTypeFromNative(native_event),
+ GetKeyStateFlags()),
+ key_code_(ui::VKEY_UNKNOWN /* TODO: obtain */),
+ character_(0),
+ unmodified_character_(0) {
+}
+
+KeyEvent::KeyEvent(NativeEvent2 native_event_2, FromNativeEvent2 from_native)
+ : Event(native_event_2, ui::ET_UNKNOWN, 0, from_native) {
+ // No one should ever call this on Windows.
+ // TODO(beng): remove once we rid views of Gtk/Gdk.
+ NOTREACHED();
+}
+
+uint16 KeyEvent::GetCharacter() const {
+ NOTIMPLEMENTED();
+ return key_code_;
+}
+
+uint16 KeyEvent::GetUnmodifiedCharacter() const {
+ NOTIMPLEMENTED();
+ return key_code_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// MouseEvent, public:
+
+MouseEvent::MouseEvent(NativeEvent native_event)
+ : LocatedEvent(native_event) {
+}
+
+MouseEvent::MouseEvent(NativeEvent2 native_event_2,
+ FromNativeEvent2 from_native)
+ : LocatedEvent(native_event_2, from_native) {
+ // No one should ever call this on Windows.
+ // TODO(msw): remove once we rid views of Gtk/Gdk.
+ NOTREACHED();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// MouseWheelEvent, public:
+
+MouseWheelEvent::MouseWheelEvent(NativeEvent native_event)
+ : MouseEvent(native_event),
+ offset_(0 /* TODO(beng): obtain */) {
+}
+
+MouseWheelEvent::MouseWheelEvent(NativeEvent2 native_event_2,
+ FromNativeEvent2 from_native)
+ : MouseEvent(native_event_2, from_native) {
+ // No one should ever call this on Windows.
+ // TODO(msw): remove once we rid views of Gtk/Gdk.
+ NOTREACHED();
+}
+
+} // namespace views
Property changes on: views\events\event_aura.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « views/desktop/desktop_window_view.cc ('k') | views/focus/focus_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698