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

Side by Side Diff: third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp

Issue 2892393002: Move WebInputMethodControllerImpl to core/exported/ & break dependencies. (Closed)
Patch Set: Rebase. Created 3 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 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 "core/exported/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/CompositionUnderlineVectorBuilder.h" 9 #include "core/editing/CompositionUnderlineVectorBuilder.h"
10 #include "core/editing/EditingUtilities.h" 10 #include "core/editing/EditingUtilities.h"
11 #include "core/editing/Editor.h" 11 #include "core/editing/Editor.h"
12 #include "core/editing/EphemeralRange.h" 12 #include "core/editing/EphemeralRange.h"
13 #include "core/editing/FrameSelection.h" 13 #include "core/editing/FrameSelection.h"
14 #include "core/editing/InputMethodController.h" 14 #include "core/editing/InputMethodController.h"
15 #include "core/editing/PlainTextRange.h" 15 #include "core/editing/PlainTextRange.h"
16 #include "core/exported/WebPluginContainerBase.h" 16 #include "core/exported/WebPluginContainerBase.h"
17 #include "core/frame/LocalFrame.h" 17 #include "core/frame/LocalFrame.h"
18 #include "core/frame/WebLocalFrameBase.h"
18 #include "core/page/FocusController.h" 19 #include "core/page/FocusController.h"
19 #include "core/page/Page.h" 20 #include "core/page/Page.h"
20 #include "platform/UserGestureIndicator.h" 21 #include "platform/UserGestureIndicator.h"
21 #include "public/platform/WebString.h" 22 #include "public/platform/WebString.h"
22 #include "public/web/WebPlugin.h" 23 #include "public/web/WebPlugin.h"
23 #include "public/web/WebRange.h" 24 #include "public/web/WebRange.h"
24 #include "web/WebLocalFrameImpl.h"
25 25
26 namespace blink { 26 namespace blink {
27 27
28 WebInputMethodControllerImpl::WebInputMethodControllerImpl( 28 WebInputMethodControllerImpl::WebInputMethodControllerImpl(
29 WebLocalFrameImpl& web_frame) 29 WebLocalFrameBase& web_frame)
30 : web_frame_(&web_frame) {} 30 : web_frame_(&web_frame) {}
31 31
32 WebInputMethodControllerImpl::~WebInputMethodControllerImpl() {} 32 WebInputMethodControllerImpl::~WebInputMethodControllerImpl() {}
33 33
34 // static
35 WebInputMethodControllerImpl* WebInputMethodControllerImpl::FromFrame(
36 LocalFrame* frame) {
37 WebLocalFrameImpl* web_frame_impl = WebLocalFrameImpl::FromFrame(frame);
38 return web_frame_impl ? web_frame_impl->GetInputMethodController() : nullptr;
39 }
40
41 DEFINE_TRACE(WebInputMethodControllerImpl) { 34 DEFINE_TRACE(WebInputMethodControllerImpl) {
42 visitor->Trace(web_frame_); 35 visitor->Trace(web_frame_);
43 } 36 }
44 37
45 bool WebInputMethodControllerImpl::SetComposition( 38 bool WebInputMethodControllerImpl::SetComposition(
46 const WebString& text, 39 const WebString& text,
47 const WebVector<WebCompositionUnderline>& underlines, 40 const WebVector<WebCompositionUnderline>& underlines,
48 const WebRange& replacement_range, 41 const WebRange& replacement_range,
49 int selection_start, 42 int selection_start,
50 int selection_end) { 43 int selection_end) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 WebPlugin* WebInputMethodControllerImpl::FocusedPluginIfInputMethodSupported() 151 WebPlugin* WebInputMethodControllerImpl::FocusedPluginIfInputMethodSupported()
159 const { 152 const {
160 WebPluginContainerBase* container = GetFrame()->GetWebPluginContainerBase(); 153 WebPluginContainerBase* container = GetFrame()->GetWebPluginContainerBase();
161 if (container && container->SupportsInputMethod()) { 154 if (container && container->SupportsInputMethod()) {
162 return container->Plugin(); 155 return container->Plugin();
163 } 156 }
164 return nullptr; 157 return nullptr;
165 } 158 }
166 159
167 } // namespace blink 160 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698