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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased & removed views::View::GetTextInputClient & removed GetFocusedTextInputClient. Created 5 years, 6 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
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 "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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 // Send a blink::WebInputEvent::Char event to |host_|. 1610 // Send a blink::WebInputEvent::Char event to |host_|.
1611 NativeWebKeyboardEvent webkit_event(ui::ET_KEY_PRESSED, 1611 NativeWebKeyboardEvent webkit_event(ui::ET_KEY_PRESSED,
1612 true /* is_char */, 1612 true /* is_char */,
1613 ch, 1613 ch,
1614 flags, 1614 flags,
1615 now); 1615 now);
1616 ForwardKeyboardEvent(webkit_event); 1616 ForwardKeyboardEvent(webkit_event);
1617 } 1617 }
1618 } 1618 }
1619 1619
1620 gfx::NativeWindow RenderWidgetHostViewAura::GetAttachedWindow() const {
1621 return window_;
1622 }
1623
1624 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const { 1620 ui::TextInputType RenderWidgetHostViewAura::GetTextInputType() const {
1625 return text_input_type_; 1621 return text_input_type_;
1626 } 1622 }
1627 1623
1628 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const { 1624 ui::TextInputMode RenderWidgetHostViewAura::GetTextInputMode() const {
1629 return text_input_mode_; 1625 return text_input_mode_;
1630 } 1626 }
1631 1627
1632 int RenderWidgetHostViewAura::GetTextInputFlags() const { 1628 int RenderWidgetHostViewAura::GetTextInputFlags() const {
1633 return text_input_flags_; 1629 return text_input_flags_;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 // WebContentsViewAura since changes to the Window's bounds need to be 1833 // WebContentsViewAura since changes to the Window's bounds need to be
1838 // messaged to the renderer. WebContentsViewAura invokes SetSize() or 1834 // messaged to the renderer. WebContentsViewAura invokes SetSize() or
1839 // SetBounds() itself. No matter how we got here, any redundant calls are 1835 // SetBounds() itself. No matter how we got here, any redundant calls are
1840 // harmless. 1836 // harmless.
1841 SetSize(new_bounds.size()); 1837 SetSize(new_bounds.size());
1842 1838
1843 if (GetInputMethod()) 1839 if (GetInputMethod())
1844 GetInputMethod()->OnCaretBoundsChanged(this); 1840 GetInputMethod()->OnCaretBoundsChanged(this);
1845 } 1841 }
1846 1842
1847 ui::TextInputClient* RenderWidgetHostViewAura::GetFocusedTextInputClient() {
1848 return GetTextInputClient();
1849 }
1850
1851 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) { 1843 gfx::NativeCursor RenderWidgetHostViewAura::GetCursor(const gfx::Point& point) {
1852 if (mouse_locked_) 1844 if (mouse_locked_)
1853 return ui::kCursorNone; 1845 return ui::kCursorNone;
1854 return current_cursor_.GetNativeCursor(); 1846 return current_cursor_.GetNativeCursor();
1855 } 1847 }
1856 1848
1857 int RenderWidgetHostViewAura::GetNonClientComponent( 1849 int RenderWidgetHostViewAura::GetNonClientComponent(
1858 const gfx::Point& point) const { 1850 const gfx::Point& point) const {
1859 return HTCLIENT; 1851 return HTCLIENT;
1860 } 1852 }
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 #if defined(OS_WIN) 2673 #if defined(OS_WIN)
2682 // Update the legacy window's parent temporarily to the desktop window. It 2674 // Update the legacy window's parent temporarily to the desktop window. It
2683 // will eventually get reparented to the right root. 2675 // will eventually get reparented to the right root.
2684 if (legacy_render_widget_host_HWND_) 2676 if (legacy_render_widget_host_HWND_)
2685 legacy_render_widget_host_HWND_->UpdateParent(::GetDesktopWindow()); 2677 legacy_render_widget_host_HWND_->UpdateParent(::GetDesktopWindow());
2686 #endif 2678 #endif
2687 } 2679 }
2688 2680
2689 void RenderWidgetHostViewAura::DetachFromInputMethod() { 2681 void RenderWidgetHostViewAura::DetachFromInputMethod() {
2690 ui::InputMethod* input_method = GetInputMethod(); 2682 ui::InputMethod* input_method = GetInputMethod();
2691 if (input_method && input_method->GetTextInputClient() == this) 2683 if (input_method)
2692 input_method->SetFocusedTextInputClient(NULL); 2684 input_method->DetachTextInputClient(this);
2693 } 2685 }
2694 2686
2695 void RenderWidgetHostViewAura::ForwardKeyboardEvent( 2687 void RenderWidgetHostViewAura::ForwardKeyboardEvent(
2696 const NativeWebKeyboardEvent& event) { 2688 const NativeWebKeyboardEvent& event) {
2697 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 2689 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
2698 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate = 2690 ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate =
2699 ui::GetTextEditKeyBindingsDelegate(); 2691 ui::GetTextEditKeyBindingsDelegate();
2700 std::vector<ui::TextEditCommandAuraLinux> commands; 2692 std::vector<ui::TextEditCommandAuraLinux> commands;
2701 if (!event.skip_in_browser && 2693 if (!event.skip_in_browser &&
2702 keybinding_delegate && 2694 keybinding_delegate &&
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2800 2792
2801 //////////////////////////////////////////////////////////////////////////////// 2793 ////////////////////////////////////////////////////////////////////////////////
2802 // RenderWidgetHostViewBase, public: 2794 // RenderWidgetHostViewBase, public:
2803 2795
2804 // static 2796 // static
2805 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2797 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2806 GetScreenInfoForWindow(results, NULL); 2798 GetScreenInfoForWindow(results, NULL);
2807 } 2799 }
2808 2800
2809 } // namespace content 2801 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698