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

Side by Side Diff: third_party/WebKit/Source/web/WebInputMethodControllerImpl.cpp

Issue 2508363003: [refactor] - Move textInputInfo() and textInputType() from WebWidget to WebInputMethodController (Closed)
Patch Set: Fixed Rebase Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "web/WebInputMethodControllerImpl.h" 5 #include "web/WebInputMethodControllerImpl.h"
6 6
7 #include "core/InputTypeNames.h" 7 #include "core/InputTypeNames.h"
8 #include "core/dom/DocumentUserGestureToken.h" 8 #include "core/dom/DocumentUserGestureToken.h"
9 #include "core/editing/EditingUtilities.h" 9 #include "core/editing/EditingUtilities.h"
10 #include "core/editing/Editor.h" 10 #include "core/editing/Editor.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) 123 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported())
124 return plugin->commitText(text, relativeCaretPosition); 124 return plugin->commitText(text, relativeCaretPosition);
125 125
126 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 126 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
127 // needs to be audited. See http://crbug.com/590369 for more details. 127 // needs to be audited. See http://crbug.com/590369 for more details.
128 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 128 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
129 129
130 return inputMethodController().commitText(text, relativeCaretPosition); 130 return inputMethodController().commitText(text, relativeCaretPosition);
131 } 131 }
132 132
133 WebTextInputInfo WebInputMethodControllerImpl::textInputInfo() {
134 return frame()->inputMethodController().textInputInfo();
135 }
136
137 WebTextInputType WebInputMethodControllerImpl::textInputType() {
138 return frame()->inputMethodController().textInputType();
139 }
140
133 LocalFrame* WebInputMethodControllerImpl::frame() const { 141 LocalFrame* WebInputMethodControllerImpl::frame() const {
134 return m_webLocalFrame->frame(); 142 return m_webLocalFrame->frame();
135 } 143 }
136 144
137 InputMethodController& WebInputMethodControllerImpl::inputMethodController() 145 InputMethodController& WebInputMethodControllerImpl::inputMethodController()
138 const { 146 const {
139 return frame()->inputMethodController(); 147 return frame()->inputMethodController();
140 } 148 }
141 149
142 WebPlugin* WebInputMethodControllerImpl::focusedPluginIfInputMethodSupported() 150 WebPlugin* WebInputMethodControllerImpl::focusedPluginIfInputMethodSupported()
143 const { 151 const {
144 WebPluginContainerImpl* container = 152 WebPluginContainerImpl* container =
145 WebLocalFrameImpl::currentPluginContainer(frame()); 153 WebLocalFrameImpl::currentPluginContainer(frame());
146 if (container && container->supportsInputMethod()) 154 if (container && container->supportsInputMethod())
147 return container->plugin(); 155 return container->plugin();
148 return nullptr; 156 return nullptr;
149 } 157 }
150 158
151 } // namespace blink 159 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebInputMethodControllerImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698