| 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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1960 | 1960 |
| 1961 #if defined(OS_MACOSX) | 1961 #if defined(OS_MACOSX) |
| 1962 if (!is_hidden() && view_ && view_->PostProcessEventForPluginIme(event.event)) | 1962 if (!is_hidden() && view_ && view_->PostProcessEventForPluginIme(event.event)) |
| 1963 return; | 1963 return; |
| 1964 #endif | 1964 #endif |
| 1965 | 1965 |
| 1966 // We only send unprocessed key event upwards if we are not hidden, | 1966 // We only send unprocessed key event upwards if we are not hidden, |
| 1967 // because the user has moved away from us and no longer expect any effect | 1967 // because the user has moved away from us and no longer expect any effect |
| 1968 // of this key event. | 1968 // of this key event. |
| 1969 const bool processed = (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result); | 1969 const bool processed = (INPUT_EVENT_ACK_STATE_CONSUMED == ack_result); |
| 1970 if (delegate_ && !processed && !is_hidden() && !event.event.skip_in_browser) { | 1970 const bool is_composition_key = event.event.nativeKeyCode == 229; |
| 1971 if (delegate_ && !processed && !is_hidden() && !event.event.skip_in_browser |
| 1972 && !is_composition_key) { |
| 1973 LOG(ERROR) << "XXX OnKeyboardEventAck: UnhandledKeyEvent"; |
| 1971 delegate_->HandleKeyboardEvent(event.event); | 1974 delegate_->HandleKeyboardEvent(event.event); |
| 1972 | 1975 |
| 1973 // WARNING: This RenderWidgetHostImpl can be deallocated at this point | 1976 // WARNING: This RenderWidgetHostImpl can be deallocated at this point |
| 1974 // (i.e. in the case of Ctrl+W, where the call to | 1977 // (i.e. in the case of Ctrl+W, where the call to |
| 1975 // HandleKeyboardEvent destroys this RenderWidgetHostImpl). | 1978 // HandleKeyboardEvent destroys this RenderWidgetHostImpl). |
| 1976 } | 1979 } |
| 1977 } | 1980 } |
| 1978 | 1981 |
| 1979 void RenderWidgetHostImpl::OnMouseEventAck( | 1982 void RenderWidgetHostImpl::OnMouseEventAck( |
| 1980 const MouseEventWithLatencyInfo& mouse_event, | 1983 const MouseEventWithLatencyInfo& mouse_event, |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 } | 2241 } |
| 2239 | 2242 |
| 2240 #if defined(OS_WIN) | 2243 #if defined(OS_WIN) |
| 2241 gfx::NativeViewAccessible | 2244 gfx::NativeViewAccessible |
| 2242 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2245 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2243 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2246 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2244 } | 2247 } |
| 2245 #endif | 2248 #endif |
| 2246 | 2249 |
| 2247 } // namespace content | 2250 } // namespace content |
| OLD | NEW |