OLD | NEW |
---|---|
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/CompositionUnderlineVectorBuilder.h" | 9 #include "core/editing/CompositionUnderlineVectorBuilder.h" |
10 #include "core/editing/EditingUtilities.h" | 10 #include "core/editing/EditingUtilities.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 return web_local_frame_->GetFrame(); | 151 return web_local_frame_->GetFrame(); |
152 } | 152 } |
153 | 153 |
154 InputMethodController& WebInputMethodControllerImpl::GetInputMethodController() | 154 InputMethodController& WebInputMethodControllerImpl::GetInputMethodController() |
155 const { | 155 const { |
156 return GetFrame()->GetInputMethodController(); | 156 return GetFrame()->GetInputMethodController(); |
157 } | 157 } |
158 | 158 |
159 WebPlugin* WebInputMethodControllerImpl::FocusedPluginIfInputMethodSupported() | 159 WebPlugin* WebInputMethodControllerImpl::FocusedPluginIfInputMethodSupported() |
160 const { | 160 const { |
161 WebPluginContainerBase* container = | 161 if (GetFrame()) { |
dcheng
2017/05/19 09:07:02
This GetFrame() check shouldn't be required.
We p
slangley
2017/05/21 23:53:33
Removed the check - no other methods have it.
| |
162 WebLocalFrameImpl::CurrentPluginContainer(GetFrame()); | 162 WebPluginContainerBase* container = GetFrame()->GetWebPluginContainerBase(); |
163 if (container && container->SupportsInputMethod()) | 163 if (container && container->SupportsInputMethod()) |
164 return container->Plugin(); | 164 return container->Plugin(); |
165 } | |
165 return nullptr; | 166 return nullptr; |
166 } | 167 } |
167 | 168 |
168 } // namespace blink | 169 } // namespace blink |
OLD | NEW |