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

Side by Side Diff: ui/views/widget/desktop_native_widget_aura.cc

Issue 10911317: KeyEvent work. (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
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/desktop_root_window_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/views/widget/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_native_widget_aura.h"
6 6
7 #include "ui/aura/root_window_host.h" 7 #include "ui/aura/root_window_host.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/base/hit_test.h" 9 #include "ui/base/hit_test.h"
10 #include "ui/compositor/layer.h" 10 #include "ui/compositor/layer.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 void DesktopNativeWidgetAura::ReleaseCapture() { 112 void DesktopNativeWidgetAura::ReleaseCapture() {
113 } 113 }
114 114
115 bool DesktopNativeWidgetAura::HasCapture() const { 115 bool DesktopNativeWidgetAura::HasCapture() const {
116 return false; 116 return false;
117 } 117 }
118 118
119 InputMethod* DesktopNativeWidgetAura::CreateInputMethod() { 119 InputMethod* DesktopNativeWidgetAura::CreateInputMethod() {
120 return NULL; 120 return desktop_root_window_host_->CreateInputMethod();
121 } 121 }
122 122
123 internal::InputMethodDelegate* 123 internal::InputMethodDelegate*
124 DesktopNativeWidgetAura::GetInputMethodDelegate() { 124 DesktopNativeWidgetAura::GetInputMethodDelegate() {
125 return NULL; 125 return NULL;
126 } 126 }
127 127
128 void DesktopNativeWidgetAura::CenterWindow(const gfx::Size& size) { 128 void DesktopNativeWidgetAura::CenterWindow(const gfx::Size& size) {
129 } 129 }
130 130
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // The layer we create doesn't have an external texture, so this should never 373 // The layer we create doesn't have an external texture, so this should never
374 // get invoked. 374 // get invoked.
375 NOTREACHED(); 375 NOTREACHED();
376 return scoped_refptr<ui::Texture>(); 376 return scoped_refptr<ui::Texture>();
377 } 377 }
378 378
379 //////////////////////////////////////////////////////////////////////////////// 379 ////////////////////////////////////////////////////////////////////////////////
380 // DesktopNativeWidgetAura, ui::EventHandler implementation: 380 // DesktopNativeWidgetAura, ui::EventHandler implementation:
381 381
382 ui::EventResult DesktopNativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) { 382 ui::EventResult DesktopNativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) {
383 return ui::ER_UNHANDLED; 383 return native_widget_delegate_->OnKeyEvent(*event) ? ui::ER_HANDLED :
384 ui::ER_UNHANDLED;
384 } 385 }
385 386
386 ui::EventResult DesktopNativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) { 387 ui::EventResult DesktopNativeWidgetAura::OnMouseEvent(ui::MouseEvent* event) {
387 DCHECK(window_->IsVisible()); 388 DCHECK(window_->IsVisible());
388 if (event->type() == ui::ET_MOUSEWHEEL) { 389 if (event->type() == ui::ET_MOUSEWHEEL) {
389 return native_widget_delegate_->OnMouseEvent(*event) ? 390 return native_widget_delegate_->OnMouseEvent(*event) ?
390 ui::ER_HANDLED : ui::ER_UNHANDLED; 391 ui::ER_HANDLED : ui::ER_UNHANDLED;
391 } 392 }
392 393
393 if (event->type() == ui::ET_SCROLL) { 394 if (event->type() == ui::ET_SCROLL) {
(...skipping 12 matching lines...) Expand all
406 ui::TouchStatus DesktopNativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) { 407 ui::TouchStatus DesktopNativeWidgetAura::OnTouchEvent(ui::TouchEvent* event) {
407 return ui::TOUCH_STATUS_UNKNOWN; 408 return ui::TOUCH_STATUS_UNKNOWN;
408 } 409 }
409 410
410 ui::EventResult DesktopNativeWidgetAura::OnGestureEvent( 411 ui::EventResult DesktopNativeWidgetAura::OnGestureEvent(
411 ui::GestureEvent* event) { 412 ui::GestureEvent* event) {
412 return ui::ER_UNHANDLED; 413 return ui::ER_UNHANDLED;
413 } 414 }
414 415
415 } // namespace views 416 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/views.gyp ('k') | ui/views/widget/desktop_root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698