| 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 27 matching lines...) Expand all Loading... |
| 38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
| 39 #include "core/dom/Fullscreen.h" | 39 #include "core/dom/Fullscreen.h" |
| 40 #include "core/dom/Node.h" | 40 #include "core/dom/Node.h" |
| 41 #include "core/events/UIEventWithKeyState.h" | 41 #include "core/events/UIEventWithKeyState.h" |
| 42 #include "core/events/WebInputEventConversion.h" | 42 #include "core/events/WebInputEventConversion.h" |
| 43 #include "core/exported/WebFileChooserCompletionImpl.h" | 43 #include "core/exported/WebFileChooserCompletionImpl.h" |
| 44 #include "core/exported/WebPluginContainerBase.h" | 44 #include "core/exported/WebPluginContainerBase.h" |
| 45 #include "core/exported/WebViewBase.h" | 45 #include "core/exported/WebViewBase.h" |
| 46 #include "core/frame/FrameView.h" | 46 #include "core/frame/FrameView.h" |
| 47 #include "core/frame/Settings.h" | 47 #include "core/frame/Settings.h" |
| 48 #include "core/frame/UseCounter.h" |
| 48 #include "core/frame/VisualViewport.h" | 49 #include "core/frame/VisualViewport.h" |
| 49 #include "core/html/HTMLInputElement.h" | 50 #include "core/html/HTMLInputElement.h" |
| 50 #include "core/html/forms/ColorChooser.h" | 51 #include "core/html/forms/ColorChooser.h" |
| 51 #include "core/html/forms/ColorChooserClient.h" | 52 #include "core/html/forms/ColorChooserClient.h" |
| 52 #include "core/html/forms/DateTimeChooser.h" | 53 #include "core/html/forms/DateTimeChooser.h" |
| 53 #include "core/layout/HitTestResult.h" | 54 #include "core/layout/HitTestResult.h" |
| 54 #include "core/layout/LayoutPart.h" | 55 #include "core/layout/LayoutPart.h" |
| 55 #include "core/layout/compositing/CompositedSelection.h" | 56 #include "core/layout/compositing/CompositedSelection.h" |
| 56 #include "core/loader/DocumentLoader.h" | 57 #include "core/loader/DocumentLoader.h" |
| 57 #include "core/loader/FrameLoadRequest.h" | 58 #include "core/loader/FrameLoadRequest.h" |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 KeyboardEvent& event) { | 1130 KeyboardEvent& event) { |
| 1130 WebLocalFrameImpl* webframe = | 1131 WebLocalFrameImpl* webframe = |
| 1131 WebLocalFrameImpl::FromFrame(input_element.GetDocument().GetFrame()); | 1132 WebLocalFrameImpl::FromFrame(input_element.GetDocument().GetFrame()); |
| 1132 if (webframe->AutofillClient()) | 1133 if (webframe->AutofillClient()) |
| 1133 webframe->AutofillClient()->TextFieldDidReceiveKeyDown( | 1134 webframe->AutofillClient()->TextFieldDidReceiveKeyDown( |
| 1134 WebInputElement(&input_element), WebKeyboardEventBuilder(event)); | 1135 WebInputElement(&input_element), WebKeyboardEventBuilder(event)); |
| 1135 } | 1136 } |
| 1136 | 1137 |
| 1137 void ChromeClientImpl::DidChangeValueInTextField( | 1138 void ChromeClientImpl::DidChangeValueInTextField( |
| 1138 HTMLFormControlElement& element) { | 1139 HTMLFormControlElement& element) { |
| 1139 WebLocalFrameImpl* webframe = | 1140 Document& doc = element.GetDocument(); |
| 1140 WebLocalFrameImpl::FromFrame(element.GetDocument().GetFrame()); | 1141 WebLocalFrameImpl* webframe = WebLocalFrameImpl::FromFrame(doc.GetFrame()); |
| 1141 if (webframe->AutofillClient()) | 1142 if (webframe->AutofillClient()) |
| 1142 webframe->AutofillClient()->TextFieldDidChange( | 1143 webframe->AutofillClient()->TextFieldDidChange( |
| 1143 WebFormControlElement(&element)); | 1144 WebFormControlElement(&element)); |
| 1144 | 1145 |
| 1146 UseCounter::Count(doc, doc.IsSecureContext() |
| 1147 ? UseCounter::kFieldEditInSecureContext |
| 1148 : UseCounter::kFieldEditInNonSecureContext); |
| 1145 web_view_->PageImportanceSignals()->SetHadFormInteraction(); | 1149 web_view_->PageImportanceSignals()->SetHadFormInteraction(); |
| 1146 } | 1150 } |
| 1147 | 1151 |
| 1148 void ChromeClientImpl::DidEndEditingOnTextField( | 1152 void ChromeClientImpl::DidEndEditingOnTextField( |
| 1149 HTMLInputElement& input_element) { | 1153 HTMLInputElement& input_element) { |
| 1150 WebLocalFrameImpl* webframe = | 1154 WebLocalFrameImpl* webframe = |
| 1151 WebLocalFrameImpl::FromFrame(input_element.GetDocument().GetFrame()); | 1155 WebLocalFrameImpl::FromFrame(input_element.GetDocument().GetFrame()); |
| 1152 if (webframe->AutofillClient()) | 1156 if (webframe->AutofillClient()) |
| 1153 webframe->AutofillClient()->TextFieldDidEndEditing( | 1157 webframe->AutofillClient()->TextFieldDidEndEditing( |
| 1154 WebInputElement(&input_element)); | 1158 WebInputElement(&input_element)); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 if (RuntimeEnabledFeatures::presentationEnabled()) | 1260 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1257 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1261 PresentationController::ProvideTo(frame, client->PresentationClient()); |
| 1258 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1262 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
| 1259 ProvideAudioOutputDeviceClientTo(frame, | 1263 ProvideAudioOutputDeviceClientTo(frame, |
| 1260 new AudioOutputDeviceClientImpl(frame)); | 1264 new AudioOutputDeviceClientImpl(frame)); |
| 1261 } | 1265 } |
| 1262 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1266 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
| 1263 } | 1267 } |
| 1264 | 1268 |
| 1265 } // namespace blink | 1269 } // namespace blink |
| OLD | NEW |