OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "WebAXObject.h" | 44 #include "WebAXObject.h" |
45 #include "WebAutofillClient.h" | 45 #include "WebAutofillClient.h" |
46 #include "WebColorChooser.h" | 46 #include "WebColorChooser.h" |
47 #include "WebColorSuggestion.h" | 47 #include "WebColorSuggestion.h" |
48 #include "WebConsoleMessage.h" | 48 #include "WebConsoleMessage.h" |
49 #include "WebFileChooserCompletionImpl.h" | 49 #include "WebFileChooserCompletionImpl.h" |
50 #include "WebFrameClient.h" | 50 #include "WebFrameClient.h" |
51 #include "WebFrameImpl.h" | 51 #include "WebFrameImpl.h" |
52 #include "WebInputElement.h" | 52 #include "WebInputElement.h" |
53 #include "WebInputEvent.h" | 53 #include "WebInputEvent.h" |
| 54 #include "WebInputEventConversion.h" |
54 #include "WebKit.h" | 55 #include "WebKit.h" |
55 #include "WebNode.h" | 56 #include "WebNode.h" |
56 #include "WebPasswordGeneratorClient.h" | 57 #include "WebPasswordGeneratorClient.h" |
57 #include "WebPlugin.h" | 58 #include "WebPlugin.h" |
58 #include "WebPluginContainerImpl.h" | 59 #include "WebPluginContainerImpl.h" |
59 #include "WebPopupMenuImpl.h" | 60 #include "WebPopupMenuImpl.h" |
60 #include "WebPopupMenuInfo.h" | 61 #include "WebPopupMenuInfo.h" |
61 #include "WebPopupType.h" | 62 #include "WebPopupType.h" |
62 #include "WebSettings.h" | 63 #include "WebSettings.h" |
63 #include "WebSettingsImpl.h" | 64 #include "WebSettingsImpl.h" |
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 if (m_webView->client()) | 989 if (m_webView->client()) |
989 m_webView->client()->didCancelCompositionOnSelectionChange(); | 990 m_webView->client()->didCancelCompositionOnSelectionChange(); |
990 } | 991 } |
991 | 992 |
992 void ChromeClientImpl::willSetInputMethodState() | 993 void ChromeClientImpl::willSetInputMethodState() |
993 { | 994 { |
994 if (m_webView->client()) | 995 if (m_webView->client()) |
995 m_webView->client()->resetInputMethod(); | 996 m_webView->client()->resetInputMethod(); |
996 } | 997 } |
997 | 998 |
| 999 void ChromeClientImpl::handleKeyboardEventOnTextField(HTMLInputElement& inputEle
ment, KeyboardEvent& event) |
| 1000 { |
| 1001 if (!m_webView->autofillClient()) |
| 1002 return; |
| 1003 m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inp
utElement), WebKeyboardEventBuilder(event)); |
| 1004 } |
| 1005 |
| 1006 void ChromeClientImpl::didChangeValueInTextField(HTMLInputElement& inputElement) |
| 1007 { |
| 1008 if (!m_webView->autofillClient()) |
| 1009 return; |
| 1010 m_webView->autofillClient()->textFieldDidChange(WebInputElement(&inputElemen
t)); |
| 1011 } |
| 1012 |
| 1013 void ChromeClientImpl::didEndEditingOnTextField(HTMLInputElement& inputElement) |
| 1014 { |
| 1015 if (m_webView->autofillClient()) |
| 1016 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp
utElement)); |
| 1017 |
| 1018 // Notification that focus was lost. Be careful with this, it's also sent |
| 1019 // when the page is being closed. |
| 1020 |
| 1021 // Hide any showing popup. |
| 1022 m_webView->hideAutofillPopup(); |
| 1023 } |
| 1024 |
998 #if ENABLE(NAVIGATOR_CONTENT_UTILS) | 1025 #if ENABLE(NAVIGATOR_CONTENT_UTILS) |
999 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) | 1026 PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::cre
ate(WebViewImpl* webView) |
1000 { | 1027 { |
1001 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); | 1028 return adoptPtr(new NavigatorContentUtilsClientImpl(webView)); |
1002 } | 1029 } |
1003 | 1030 |
1004 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) | 1031 NavigatorContentUtilsClientImpl::NavigatorContentUtilsClientImpl(WebViewImpl* we
bView) |
1005 : m_webView(webView) | 1032 : m_webView(webView) |
1006 { | 1033 { |
1007 } | 1034 } |
1008 | 1035 |
1009 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const String& baseURL, const String& url, const String& title) | 1036 void NavigatorContentUtilsClientImpl::registerProtocolHandler(const String& sche
me, const String& baseURL, const String& url, const String& title) |
1010 { | 1037 { |
1011 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); | 1038 m_webView->client()->registerProtocolHandler(scheme, baseURL, url, title); |
1012 } | 1039 } |
1013 #endif | 1040 #endif |
1014 | 1041 |
1015 } // namespace blink | 1042 } // namespace blink |
OLD | NEW |