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

Side by Side Diff: views/widget/native_widget_aura.cc

Issue 8342026: Get basic KeyEvents working in RWHVA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/aura/event.cc ('k') | no next file » | 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) 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 "views/widget/native_widget_aura.h" 5 #include "views/widget/native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/desktop.h" 8 #include "ui/aura/desktop.h"
9 #include "ui/aura/event.h" 9 #include "ui/aura/event.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 Widget* widget = GetWidget(); 488 Widget* widget = GetWidget();
489 if (widget->is_top_level()) { 489 if (widget->is_top_level()) {
490 InputMethod* input_method = widget->GetInputMethod(); 490 InputMethod* input_method = widget->GetInputMethod();
491 input_method->OnBlur(); 491 input_method->OnBlur();
492 widget->GetFocusManager()->StoreFocusedView(); 492 widget->GetFocusManager()->StoreFocusedView();
493 } 493 }
494 delegate_->OnNativeBlur(NULL); 494 delegate_->OnNativeBlur(NULL);
495 } 495 }
496 496
497 bool NativeWidgetAura::OnKeyEvent(aura::KeyEvent* event) { 497 bool NativeWidgetAura::OnKeyEvent(aura::KeyEvent* event) {
498 // TODO(beng): Need an InputMethodAura to properly handle character events.
499 // Right now, we just skip these.
500 if (event->is_char())
501 return false;
502
498 DCHECK(window_->IsVisible()); 503 DCHECK(window_->IsVisible());
499 InputMethod* input_method = GetWidget()->GetInputMethod(); 504 InputMethod* input_method = GetWidget()->GetInputMethod();
500 DCHECK(input_method); 505 DCHECK(input_method);
501 // TODO(oshima): DispatchKeyEvent should return bool? 506 // TODO(oshima): DispatchKeyEvent should return bool?
502 KeyEvent views_event(event); 507 KeyEvent views_event(event);
503 input_method->DispatchKeyEvent(views_event); 508 input_method->DispatchKeyEvent(views_event);
504 return true; 509 return true;
505 } 510 }
506 511
507 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) { 512 gfx::NativeCursor NativeWidgetAura::GetCursor(const gfx::Point& point) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 } 659 }
655 660
656 // static 661 // static
657 bool NativeWidgetPrivate::IsMouseButtonDown() { 662 bool NativeWidgetPrivate::IsMouseButtonDown() {
658 NOTIMPLEMENTED(); 663 NOTIMPLEMENTED();
659 return false; 664 return false;
660 } 665 }
661 666
662 } // namespace internal 667 } // namespace internal
663 } // namespace views 668 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698