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_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 if (input_method) | 2764 if (input_method) |
2765 input_method->DetachTextInputClient(this); | 2765 input_method->DetachTextInputClient(this); |
2766 } | 2766 } |
2767 | 2767 |
2768 void RenderWidgetHostViewAura::ForwardKeyboardEvent( | 2768 void RenderWidgetHostViewAura::ForwardKeyboardEvent( |
2769 const NativeWebKeyboardEvent& event) { | 2769 const NativeWebKeyboardEvent& event) { |
2770 RenderWidgetHostImpl* target_host = host_; | 2770 RenderWidgetHostImpl* target_host = host_; |
2771 | 2771 |
2772 // If there are multiple widgets on the page (such as when there are | 2772 // If there are multiple widgets on the page (such as when there are |
2773 // out-of-process iframes), pick the one that should process this event. | 2773 // out-of-process iframes), pick the one that should process this event. |
2774 if (host_->delegate()) { | 2774 if (host_->delegate()) |
2775 RenderWidgetHostImpl* focused_host = | 2775 target_host = host_->delegate()->GetFocusedRenderWidgetHost(host_); |
2776 host_->delegate()->GetFocusedRenderWidgetHost(); | |
2777 if (focused_host) | |
2778 target_host = focused_host; | |
2779 } | |
2780 | 2776 |
2781 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 2777 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
2782 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = | 2778 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = |
2783 ui::GetTextEditKeyBindingsDelegate(); | 2779 ui::GetTextEditKeyBindingsDelegate(); |
2784 std::vector<ui::TextEditCommandAuraLinux> commands; | 2780 std::vector<ui::TextEditCommandAuraLinux> commands; |
2785 if (!event.skip_in_browser && | 2781 if (!event.skip_in_browser && |
2786 keybinding_delegate && | 2782 keybinding_delegate && |
2787 event.os_event && | 2783 event.os_event && |
2788 keybinding_delegate->MatchEvent(*event.os_event, &commands)) { | 2784 keybinding_delegate->MatchEvent(*event.os_event, &commands)) { |
2789 // Transform from ui/ types to content/ types. | 2785 // Transform from ui/ types to content/ types. |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2942 | 2938 |
2943 //////////////////////////////////////////////////////////////////////////////// | 2939 //////////////////////////////////////////////////////////////////////////////// |
2944 // RenderWidgetHostViewBase, public: | 2940 // RenderWidgetHostViewBase, public: |
2945 | 2941 |
2946 // static | 2942 // static |
2947 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2943 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
2948 GetScreenInfoForWindow(results, NULL); | 2944 GetScreenInfoForWindow(results, NULL); |
2949 } | 2945 } |
2950 | 2946 |
2951 } // namespace content | 2947 } // namespace content |
OLD | NEW |