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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2301 image.getSkBitmap(), imageOffset, | 2301 image.getSkBitmap(), imageOffset, |
2302 possible_drag_event_info_)); | 2302 possible_drag_event_info_)); |
2303 } | 2303 } |
2304 | 2304 |
2305 blink::WebWidget* RenderWidget::GetWebWidget() const { | 2305 blink::WebWidget* RenderWidget::GetWebWidget() const { |
2306 return webwidget_internal_; | 2306 return webwidget_internal_; |
2307 } | 2307 } |
2308 | 2308 |
2309 blink::WebInputMethodController* RenderWidget::GetInputMethodController() | 2309 blink::WebInputMethodController* RenderWidget::GetInputMethodController() |
2310 const { | 2310 const { |
2311 // TODO(ekaramad): Remove this CHECK when GetWebWidget() is | 2311 if (!GetWebWidget()->isWebFrameWidget()) { |
2312 // always a WebFrameWidget. | 2312 // TODO(ekaramad): We should not get here in response to IME IPC or updates |
2313 CHECK(GetWebWidget()->isWebFrameWidget()); | 2313 // when the RenderWidget is swapped out. We should top sending IPCs from the |
| 2314 // browser side (https://crbug.com/669219). |
| 2315 // If there is no WebFrameWidget, then there will be no |
| 2316 // InputMethodControllers for a WebLocalFrame. |
| 2317 return nullptr; |
| 2318 } |
2314 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2319 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2315 ->getActiveWebInputMethodController(); | 2320 ->getActiveWebInputMethodController(); |
2316 } | 2321 } |
2317 | 2322 |
2318 } // namespace content | 2323 } // namespace content |
OLD | NEW |