OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 #include "public/platform/WebGestureCurve.h" | 130 #include "public/platform/WebGestureCurve.h" |
131 #include "public/platform/WebImage.h" | 131 #include "public/platform/WebImage.h" |
132 #include "public/platform/WebLayerTreeView.h" | 132 #include "public/platform/WebLayerTreeView.h" |
133 #include "public/platform/WebScheduler.h" | 133 #include "public/platform/WebScheduler.h" |
134 #include "public/platform/WebURLRequest.h" | 134 #include "public/platform/WebURLRequest.h" |
135 #include "public/platform/WebVector.h" | 135 #include "public/platform/WebVector.h" |
136 #include "public/platform/WebViewScheduler.h" | 136 #include "public/platform/WebViewScheduler.h" |
137 #include "public/web/WebAXObject.h" | 137 #include "public/web/WebAXObject.h" |
138 #include "public/web/WebActiveWheelFlingParameters.h" | 138 #include "public/web/WebActiveWheelFlingParameters.h" |
139 #include "public/web/WebAutofillClient.h" | 139 #include "public/web/WebAutofillClient.h" |
| 140 #include "public/web/WebConsoleMessage.h" |
140 #include "public/web/WebElement.h" | 141 #include "public/web/WebElement.h" |
141 #include "public/web/WebFrame.h" | 142 #include "public/web/WebFrame.h" |
142 #include "public/web/WebFrameClient.h" | 143 #include "public/web/WebFrameClient.h" |
143 #include "public/web/WebFrameWidget.h" | 144 #include "public/web/WebFrameWidget.h" |
144 #include "public/web/WebHitTestResult.h" | 145 #include "public/web/WebHitTestResult.h" |
145 #include "public/web/WebInputElement.h" | 146 #include "public/web/WebInputElement.h" |
146 #include "public/web/WebMeaningfulLayout.h" | 147 #include "public/web/WebMeaningfulLayout.h" |
147 #include "public/web/WebMediaPlayerAction.h" | 148 #include "public/web/WebMediaPlayerAction.h" |
148 #include "public/web/WebNode.h" | 149 #include "public/web/WebNode.h" |
149 #include "public/web/WebPlugin.h" | 150 #include "public/web/WebPlugin.h" |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 { | 1047 { |
1047 if (m_client) | 1048 if (m_client) |
1048 FontCache::acceptLanguagesChanged(m_client->acceptLanguages()); | 1049 FontCache::acceptLanguagesChanged(m_client->acceptLanguages()); |
1049 | 1050 |
1050 if (!page()) | 1051 if (!page()) |
1051 return; | 1052 return; |
1052 | 1053 |
1053 page()->acceptLanguagesChanged(); | 1054 page()->acceptLanguagesChanged(); |
1054 } | 1055 } |
1055 | 1056 |
| 1057 void WebViewImpl::ReportIntervention(const WebString& message) |
| 1058 { |
| 1059 if (!mainFrame()) |
| 1060 return; |
| 1061 WebConsoleMessage consoleMessage(WebConsoleMessage::LevelWarning, message); |
| 1062 mainFrame()->addMessageToConsole(consoleMessage); |
| 1063 } |
| 1064 |
1056 WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) | 1065 WebInputEventResult WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event) |
1057 { | 1066 { |
1058 DCHECK((event.type == WebInputEvent::RawKeyDown) | 1067 DCHECK((event.type == WebInputEvent::RawKeyDown) |
1059 || (event.type == WebInputEvent::KeyDown) | 1068 || (event.type == WebInputEvent::KeyDown) |
1060 || (event.type == WebInputEvent::KeyUp)); | 1069 || (event.type == WebInputEvent::KeyUp)); |
1061 TRACE_EVENT2("input", "WebViewImpl::handleKeyEvent", | 1070 TRACE_EVENT2("input", "WebViewImpl::handleKeyEvent", |
1062 "type", inputTypeToName(event.type), | 1071 "type", inputTypeToName(event.type), |
1063 "text", String(event.text).utf8()); | 1072 "text", String(event.text).utf8()); |
1064 | 1073 |
1065 // Halt an in-progress fling on a key event. | 1074 // Halt an in-progress fling on a key event. |
(...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4618 return nullptr; | 4627 return nullptr; |
4619 return focusedFrame; | 4628 return focusedFrame; |
4620 } | 4629 } |
4621 | 4630 |
4622 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const | 4631 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const |
4623 { | 4632 { |
4624 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; | 4633 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; |
4625 } | 4634 } |
4626 | 4635 |
4627 } // namespace blink | 4636 } // namespace blink |
OLD | NEW |