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

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

Issue 11570012: events: Update key-event handlers to not return EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-for-landing Created 8 years 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/widget/native_widget_delegate.h ('k') | ui/views/widget/root_view.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/native_widget_win.h" 5 #include "ui/views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 InputMethod* input_method = GetInputMethod(); 757 InputMethod* input_method = GetInputMethod();
758 if (input_method) 758 if (input_method)
759 input_method->OnBlur(); 759 input_method->OnBlur();
760 } 760 }
761 761
762 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) { 762 bool NativeWidgetWin::HandleMouseEvent(const ui::MouseEvent& event) {
763 return delegate_->OnMouseEvent(event); 763 return delegate_->OnMouseEvent(event);
764 } 764 }
765 765
766 bool NativeWidgetWin::HandleKeyEvent(const ui::KeyEvent& event) { 766 bool NativeWidgetWin::HandleKeyEvent(const ui::KeyEvent& event) {
767 return delegate_->OnKeyEvent(event); 767 delegate_->OnKeyEvent(const_cast<ui::KeyEvent*>(&event));
768 return event.handled();
768 } 769 }
769 770
770 bool NativeWidgetWin::HandleUntranslatedKeyEvent(const ui::KeyEvent& event) { 771 bool NativeWidgetWin::HandleUntranslatedKeyEvent(const ui::KeyEvent& event) {
771 InputMethod* input_method = GetInputMethod(); 772 InputMethod* input_method = GetInputMethod();
772 if (input_method) 773 if (input_method)
773 input_method->DispatchKeyEvent(event); 774 input_method->DispatchKeyEvent(event);
774 return !!input_method; 775 return !!input_method;
775 } 776 }
776 777
777 bool NativeWidgetWin::HandleIMEMessage(UINT message, 778 bool NativeWidgetWin::HandleIMEMessage(UINT message,
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 // static 1024 // static
1024 bool NativeWidgetPrivate::IsTouchDown() { 1025 bool NativeWidgetPrivate::IsTouchDown() {
1025 // This currently isn't necessary because we're not generating touch events on 1026 // This currently isn't necessary because we're not generating touch events on
1026 // windows. When we do, this will need to be updated. 1027 // windows. When we do, this will need to be updated.
1027 return false; 1028 return false;
1028 } 1029 }
1029 1030
1030 } // namespace internal 1031 } // namespace internal
1031 1032
1032 } // namespace views 1033 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_delegate.h ('k') | ui/views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698