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

Side by Side Diff: trunk/src/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 23710009: Revert 219673 "Fix Views Combobox and Tree View text input." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/aura/client/activation_client.h" 8 #include "ui/aura/client/activation_client.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 } 859 }
860 } 860 }
861 } 861 }
862 862
863 //////////////////////////////////////////////////////////////////////////////// 863 ////////////////////////////////////////////////////////////////////////////////
864 // DesktopNativeWidgetAura, aura::client::FocusChangeObserver implementation: 864 // DesktopNativeWidgetAura, aura::client::FocusChangeObserver implementation:
865 865
866 void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus, 866 void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
867 aura::Window* lost_focus) { 867 aura::Window* lost_focus) {
868 if (window_ == gained_focus) { 868 if (window_ == gained_focus) {
869 desktop_root_window_host_->OnNativeWidgetFocus();
869 native_widget_delegate_->OnNativeFocus(lost_focus); 870 native_widget_delegate_->OnNativeFocus(lost_focus);
871
872 // If focus is moving from a descendant Window to |window_| then native
873 // activation hasn't changed. We still need to inform the InputMethod we've
874 // been focused though.
875 InputMethod* input_method = GetWidget()->GetInputMethod();
876 if (input_method)
877 input_method->OnFocus();
870 } else if (window_ == lost_focus) { 878 } else if (window_ == lost_focus) {
879 desktop_root_window_host_->OnNativeWidgetBlur();
871 native_widget_delegate_->OnNativeBlur( 880 native_widget_delegate_->OnNativeBlur(
872 aura::client::GetFocusClient(window_)->GetFocusedWindow()); 881 aura::client::GetFocusClient(window_)->GetFocusedWindow());
873 } 882 }
874 } 883 }
875 884
876 //////////////////////////////////////////////////////////////////////////////// 885 ////////////////////////////////////////////////////////////////////////////////
877 // DesktopNativeWidgetAura, views::internal::InputMethodDelegate: 886 // DesktopNativeWidgetAura, views::internal::InputMethodDelegate:
878 887
879 void DesktopNativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) { 888 void DesktopNativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
880 FocusManager* focus_manager = 889 FocusManager* focus_manager =
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 } 930 }
922 931
923 //////////////////////////////////////////////////////////////////////////////// 932 ////////////////////////////////////////////////////////////////////////////////
924 // DesktopNativeWidgetAura, NativeWidget implementation: 933 // DesktopNativeWidgetAura, NativeWidget implementation:
925 934
926 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { 935 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() {
927 return this; 936 return this;
928 } 937 }
929 938
930 } // namespace views 939 } // namespace views
OLDNEW
« no previous file with comments | « trunk/src/ui/views/ime/mock_input_method.cc ('k') | trunk/src/ui/views/widget/desktop_aura/desktop_root_window_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698