| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // After calling WebWidget::layout(), expect to get this notification | 165 // After calling WebWidget::layout(), expect to get this notification |
| 166 // unless the view did not need a layout. | 166 // unless the view did not need a layout. |
| 167 void layoutUpdated(WebLocalFrameImpl*); | 167 void layoutUpdated(WebLocalFrameImpl*); |
| 168 | 168 |
| 169 void updateMainFrameLayoutSize(); | 169 void updateMainFrameLayoutSize(); |
| 170 | 170 |
| 171 void scheduleAnimation(); | 171 void scheduleAnimation(); |
| 172 | 172 |
| 173 virtual void setVisibilityState(WebPageVisibilityState, bool) override; | 173 virtual void setVisibilityState(WebPageVisibilityState, bool) override; |
| 174 | 174 |
| 175 // Returns true if the event leads to scrolling. | |
| 176 static bool mapKeyCodeForScroll( | |
| 177 int keyCode, | |
| 178 ScrollDirection*, | |
| 179 ScrollGranularity*); | |
| 180 | |
| 181 // Exposed for the purpose of overriding device metrics. | 175 // Exposed for the purpose of overriding device metrics. |
| 182 void sendResizeEventAndRepaint(); | 176 void sendResizeEventAndRepaint(); |
| 183 | 177 |
| 184 WebSettingsImpl* settingsImpl(); | 178 WebSettingsImpl* settingsImpl(); |
| 185 | 179 |
| 186 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); | 180 IntPoint clampOffsetAtScale(const IntPoint& offset, float scale); |
| 187 | 181 |
| 188 // Exposed for tests. | 182 // Exposed for tests. |
| 189 WebVector<WebCompositionUnderline> compositionUnderlines() const; | 183 WebVector<WebCompositionUnderline> compositionUnderlines() const; |
| 190 | 184 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 207 }; | 201 }; |
| 208 | 202 |
| 209 explicit WebViewImpl(WebViewClient*); | 203 explicit WebViewImpl(WebViewClient*); |
| 210 virtual ~WebViewImpl(); | 204 virtual ~WebViewImpl(); |
| 211 | 205 |
| 212 WebTextInputType textInputType(); | 206 WebTextInputType textInputType(); |
| 213 int textInputFlags(); | 207 int textInputFlags(); |
| 214 | 208 |
| 215 WebString inputModeOfFocusedElement(); | 209 WebString inputModeOfFocusedElement(); |
| 216 | 210 |
| 217 // Returns true if the event was actually processed. | |
| 218 bool keyEventDefault(const WebKeyboardEvent&); | |
| 219 | |
| 220 bool confirmComposition(const WebString& text, ConfirmCompositionBehavior); | 211 bool confirmComposition(const WebString& text, ConfirmCompositionBehavior); |
| 221 | 212 |
| 222 // Returns true if the view was scrolled. | |
| 223 bool scrollViewWithKeyboard(int keyCode, int modifiers); | |
| 224 | |
| 225 // Converts |pos| from window coordinates to contents coordinates and gets | 213 // Converts |pos| from window coordinates to contents coordinates and gets |
| 226 // the HitTestResult for it. | 214 // the HitTestResult for it. |
| 227 HitTestResult hitTestResultForWindowPos(const IntPoint&); | 215 HitTestResult hitTestResultForWindowPos(const IntPoint&); |
| 228 | 216 |
| 229 void doComposite(); | 217 void doComposite(); |
| 230 void reallocateRenderer(); | 218 void reallocateRenderer(); |
| 231 | 219 |
| 232 bool handleCharEvent(const WebKeyboardEvent&); | |
| 233 bool handleGestureEvent(const WebGestureEvent&); | |
| 234 bool handleKeyEvent(const WebKeyboardEvent&); | |
| 235 | |
| 236 InputMethodContext* inputMethodContext(); | 220 InputMethodContext* inputMethodContext(); |
| 237 | 221 |
| 238 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) | 222 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) |
| 239 WebSpellCheckClient* m_spellCheckClient; | 223 WebSpellCheckClient* m_spellCheckClient; |
| 240 | 224 |
| 241 ChromeClientImpl m_chromeClientImpl; | 225 ChromeClientImpl m_chromeClientImpl; |
| 242 EditorClientImpl m_editorClientImpl; | 226 EditorClientImpl m_editorClientImpl; |
| 243 SpellCheckerClientImpl m_spellCheckerClientImpl; | 227 SpellCheckerClientImpl m_spellCheckerClientImpl; |
| 244 | 228 |
| 245 WebSize m_size; | 229 WebSize m_size; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 WebColor m_backgroundColorOverride; | 270 WebColor m_backgroundColorOverride; |
| 287 }; | 271 }; |
| 288 | 272 |
| 289 // We have no ways to check if the specified WebView is an instance of | 273 // We have no ways to check if the specified WebView is an instance of |
| 290 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 274 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 291 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 275 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 292 | 276 |
| 293 } // namespace blink | 277 } // namespace blink |
| 294 | 278 |
| 295 #endif // SKY_ENGINE_WEB_WEBVIEWIMPL_H_ | 279 #endif // SKY_ENGINE_WEB_WEBVIEWIMPL_H_ |
| OLD | NEW |