OLD | NEW |
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 "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 const gfx::Point& new_origin) { | 1173 const gfx::Point& new_origin) { |
1174 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMoved", | 1174 TRACE_EVENT1("views", "DesktopNativeWidgetAura::OnHostMoved", |
1175 "new_origin", new_origin.ToString()); | 1175 "new_origin", new_origin.ToString()); |
1176 | 1176 |
1177 native_widget_delegate_->OnNativeWidgetMove(); | 1177 native_widget_delegate_->OnNativeWidgetMove(); |
1178 } | 1178 } |
1179 | 1179 |
1180 //////////////////////////////////////////////////////////////////////////////// | 1180 //////////////////////////////////////////////////////////////////////////////// |
1181 // DesktopNativeWidgetAura, NativeWidget implementation: | 1181 // DesktopNativeWidgetAura, NativeWidget implementation: |
1182 | 1182 |
1183 ui::EventHandler* DesktopNativeWidgetAura::GetEventHandler() { | 1183 void DesktopNativeWidgetAura::RepostNativeEvent(gfx::NativeEvent os_event) { |
1184 return this; | 1184 OnEvent(os_event); |
1185 } | 1185 } |
1186 | 1186 |
1187 void DesktopNativeWidgetAura::InstallInputMethodEventFilter() { | 1187 void DesktopNativeWidgetAura::InstallInputMethodEventFilter() { |
1188 DCHECK(!input_method_event_filter_.get()); | 1188 DCHECK(!input_method_event_filter_.get()); |
1189 | 1189 |
1190 input_method_event_filter_.reset(new wm::InputMethodEventFilter( | 1190 input_method_event_filter_.reset(new wm::InputMethodEventFilter( |
1191 host_->GetAcceleratedWidget())); | 1191 host_->GetAcceleratedWidget())); |
1192 input_method_event_filter_->SetInputMethodPropertyInRootWindow( | 1192 input_method_event_filter_->SetInputMethodPropertyInRootWindow( |
1193 host_->window()); | 1193 host_->window()); |
1194 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); | 1194 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); |
(...skipping 13 matching lines...) Expand all Loading... |
1208 if (cursor_reference_count_ == 0) { | 1208 if (cursor_reference_count_ == 0) { |
1209 // We are the last DesktopNativeWidgetAura instance, and we are responsible | 1209 // We are the last DesktopNativeWidgetAura instance, and we are responsible |
1210 // for cleaning up |cursor_manager_|. | 1210 // for cleaning up |cursor_manager_|. |
1211 delete cursor_manager_; | 1211 delete cursor_manager_; |
1212 native_cursor_manager_ = NULL; | 1212 native_cursor_manager_ = NULL; |
1213 cursor_manager_ = NULL; | 1213 cursor_manager_ = NULL; |
1214 } | 1214 } |
1215 } | 1215 } |
1216 | 1216 |
1217 } // namespace views | 1217 } // namespace views |
OLD | NEW |