| 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 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 } | 1783 } |
| 1784 | 1784 |
| 1785 void RenderWidget::OnDragSourceSystemDragEnded() { | 1785 void RenderWidget::OnDragSourceSystemDragEnded() { |
| 1786 if (!GetWebWidget()) | 1786 if (!GetWebWidget()) |
| 1787 return; | 1787 return; |
| 1788 | 1788 |
| 1789 static_cast<WebFrameWidget*>(GetWebWidget())->dragSourceSystemDragEnded(); | 1789 static_cast<WebFrameWidget*>(GetWebWidget())->dragSourceSystemDragEnded(); |
| 1790 } | 1790 } |
| 1791 | 1791 |
| 1792 void RenderWidget::showVirtualKeyboardOnElementFocus() { | 1792 void RenderWidget::showVirtualKeyboardOnElementFocus() { |
| 1793 #if defined(OS_CHROMEOS) |
| 1794 // On ChromeOS, virtual keyboard is triggered only when users leave the |
| 1795 // mouse button or the finger and a text input element is focused at that |
| 1796 // time. Focus event itself shouldn't trigger virtual keyboard. |
| 1797 UpdateTextInputState(); |
| 1798 #else |
| 1793 ShowVirtualKeyboard(); | 1799 ShowVirtualKeyboard(); |
| 1800 #endif |
| 1794 | 1801 |
| 1795 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with | 1802 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with |
| 1796 // virtual keyboard. | 1803 // virtual keyboard. |
| 1797 #if !defined(OS_ANDROID) | 1804 #if !defined(OS_ANDROID) |
| 1798 FocusChangeComplete(); | 1805 FocusChangeComplete(); |
| 1799 #endif | 1806 #endif |
| 1800 } | 1807 } |
| 1801 | 1808 |
| 1802 ui::TextInputType RenderWidget::GetTextInputType() { | 1809 ui::TextInputType RenderWidget::GetTextInputType() { |
| 1803 #if BUILDFLAG(ENABLE_PLUGINS) | 1810 #if BUILDFLAG(ENABLE_PLUGINS) |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 // browser side (https://crbug.com/669219). | 2316 // browser side (https://crbug.com/669219). |
| 2310 // If there is no WebFrameWidget, then there will be no | 2317 // If there is no WebFrameWidget, then there will be no |
| 2311 // InputMethodControllers for a WebLocalFrame. | 2318 // InputMethodControllers for a WebLocalFrame. |
| 2312 return nullptr; | 2319 return nullptr; |
| 2313 } | 2320 } |
| 2314 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2321 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2315 ->getActiveWebInputMethodController(); | 2322 ->getActiveWebInputMethodController(); |
| 2316 } | 2323 } |
| 2317 | 2324 |
| 2318 } // namespace content | 2325 } // namespace content |
| OLD | NEW |