| 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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 // Send a blink::WebInputEvent::Char event to |host_|. | 1608 // Send a blink::WebInputEvent::Char event to |host_|. |
| 1609 NativeWebKeyboardEvent webkit_event(ui::ET_KEY_PRESSED, | 1609 NativeWebKeyboardEvent webkit_event(ui::ET_KEY_PRESSED, |
| 1610 true /* is_char */, | 1610 true /* is_char */, |
| 1611 ch, | 1611 ch, |
| 1612 flags, | 1612 flags, |
| 1613 now); | 1613 now); |
| 1614 ForwardKeyboardEvent(webkit_event); | 1614 ForwardKeyboardEvent(webkit_event); |
| 1615 } | 1615 } |
| 1616 } | 1616 } |
| 1617 | 1617 |
| 1618 gfx::NativeWindow RenderWidgetHostViewAura::GetAttachedWindow() const { | |
| 1619 return window_; | |
| 1620 } | |
| 1621 | |
| 1622 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const { | 1618 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const { |
| 1623 return text_input_type_; | 1619 return text_input_type_; |
| 1624 } | 1620 } |
| 1625 | 1621 |
| 1626 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const { | 1622 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const { |
| 1627 return text_input_mode_; | 1623 return text_input_mode_; |
| 1628 } | 1624 } |
| 1629 | 1625 |
| 1630 int RenderWidgetHostViewAura::GetTextInputFlags() const { | 1626 int RenderWidgetHostViewAura::GetTextInputFlags() const { |
| 1631 return text_input_flags_; | 1627 return text_input_flags_; |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2679 #if defined(OS_WIN) | 2675 #if defined(OS_WIN) |
| 2680 // Update the legacy window's parent temporarily to the desktop window. It | 2676 // Update the legacy window's parent temporarily to the desktop window. It |
| 2681 // will eventually get reparented to the right root. | 2677 // will eventually get reparented to the right root. |
| 2682 if (legacy_render_widget_host_HWND_) | 2678 if (legacy_render_widget_host_HWND_) |
| 2683 legacy_render_widget_host_HWND_->UpdateParent(::GetDesktopWindow()); | 2679 legacy_render_widget_host_HWND_->UpdateParent(::GetDesktopWindow()); |
| 2684 #endif | 2680 #endif |
| 2685 } | 2681 } |
| 2686 | 2682 |
| 2687 void RenderWidgetHostViewAura::DetachFromInputMethod() { | 2683 void RenderWidgetHostViewAura::DetachFromInputMethod() { |
| 2688 ui::InputMethod* input_method = GetInputMethod(); | 2684 ui::InputMethod* input_method = GetInputMethod(); |
| 2689 if (input_method && input_method->GetTextInputClient() == this) | 2685 if (input_method) |
| 2690 input_method->SetFocusedTextInputClient(NULL); | 2686 input_method->DetachTextInputClient(this); |
| 2691 } | 2687 } |
| 2692 | 2688 |
| 2693 void RenderWidgetHostViewAura::ForwardKeyboardEvent( | 2689 void RenderWidgetHostViewAura::ForwardKeyboardEvent( |
| 2694 const NativeWebKeyboardEvent& event) { | 2690 const NativeWebKeyboardEvent& event) { |
| 2695 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 2691 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 2696 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = | 2692 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = |
| 2697 ui::GetTextEditKeyBindingsDelegate(); | 2693 ui::GetTextEditKeyBindingsDelegate(); |
| 2698 std::vector<ui::TextEditCommandAuraLinux> commands; | 2694 std::vector<ui::TextEditCommandAuraLinux> commands; |
| 2699 if (!event.skip_in_browser && | 2695 if (!event.skip_in_browser && |
| 2700 keybinding_delegate && | 2696 keybinding_delegate && |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 | 2794 |
| 2799 //////////////////////////////////////////////////////////////////////////////// | 2795 //////////////////////////////////////////////////////////////////////////////// |
| 2800 // RenderWidgetHostViewBase, public: | 2796 // RenderWidgetHostViewBase, public: |
| 2801 | 2797 |
| 2802 // static | 2798 // static |
| 2803 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 2799 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2804 GetScreenInfoForWindow(results, NULL); | 2800 GetScreenInfoForWindow(results, NULL); |
| 2805 } | 2801 } |
| 2806 | 2802 |
| 2807 } // namespace content | 2803 } // namespace content |
| OLD | NEW |