| 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 25 matching lines...) Expand all Loading... |
| 36 #include "../public/WebPoint.h" | 36 #include "../public/WebPoint.h" |
| 37 #include "../public/WebSize.h" | 37 #include "../public/WebSize.h" |
| 38 #include "../public/WebString.h" | 38 #include "../public/WebString.h" |
| 39 #include "../public/WebView.h" | 39 #include "../public/WebView.h" |
| 40 | 40 |
| 41 #include "BackForwardListClientImpl.h" | 41 #include "BackForwardListClientImpl.h" |
| 42 #include "ChromeClientImpl.h" | 42 #include "ChromeClientImpl.h" |
| 43 #include "ContextMenuClientImpl.h" | 43 #include "ContextMenuClientImpl.h" |
| 44 #include "DragClientImpl.h" | 44 #include "DragClientImpl.h" |
| 45 #include "EditorClientImpl.h" | 45 #include "EditorClientImpl.h" |
| 46 #include "GraphicsLayer.h" |
| 46 #include "InspectorClientImpl.h" | 47 #include "InspectorClientImpl.h" |
| 47 #include "NotificationPresenterImpl.h" | 48 #include "NotificationPresenterImpl.h" |
| 48 | 49 |
| 50 #if USE(ACCELERATED_COMPOSITING) |
| 51 #if WEBKIT_USING_SKIA |
| 52 #include "skia/LayerRendererSkia.h" |
| 53 #endif |
| 54 #endif |
| 55 |
| 49 #include <wtf/OwnPtr.h> | 56 #include <wtf/OwnPtr.h> |
| 50 #include <wtf/RefCounted.h> | 57 #include <wtf/RefCounted.h> |
| 51 | 58 |
| 52 namespace WebCore { | 59 namespace WebCore { |
| 53 class ChromiumDataObject; | 60 class ChromiumDataObject; |
| 54 class Frame; | 61 class Frame; |
| 55 class HistoryItem; | 62 class HistoryItem; |
| 56 class HitTestResult; | 63 class HitTestResult; |
| 57 class KeyboardEvent; | 64 class KeyboardEvent; |
| 58 class Page; | 65 class Page; |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 bool propagateScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity); | 296 bool propagateScroll(WebCore::ScrollDirection, WebCore::ScrollGranularity); |
| 290 | 297 |
| 291 // HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can | 298 // HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can |
| 292 // fix WebKit to pass enough information up into ChromeClient::show() so we | 299 // fix WebKit to pass enough information up into ChromeClient::show() so we |
| 293 // can decide if the window.open event was caused by a middle-mouse click | 300 // can decide if the window.open event was caused by a middle-mouse click |
| 294 static const WebInputEvent* currentInputEvent() | 301 static const WebInputEvent* currentInputEvent() |
| 295 { | 302 { |
| 296 return m_currentInputEvent; | 303 return m_currentInputEvent; |
| 297 } | 304 } |
| 298 | 305 |
| 306 #if USE(ACCELERATED_COMPOSITING) |
| 307 void setRootLayerNeedsDisplay(); |
| 308 void setRootGraphicsLayer(WebCore::PlatformLayer* layer); |
| 309 #endif |
| 310 |
| 299 private: | 311 private: |
| 300 friend class WebView; // So WebView::Create can call our constructor | 312 friend class WebView; // So WebView::Create can call our constructor |
| 301 friend class WTF::RefCounted<WebViewImpl>; | 313 friend class WTF::RefCounted<WebViewImpl>; |
| 302 | 314 |
| 303 WebViewImpl(WebViewClient* client); | 315 WebViewImpl(WebViewClient* client); |
| 304 ~WebViewImpl(); | 316 ~WebViewImpl(); |
| 305 | 317 |
| 306 // Returns true if the event was actually processed. | 318 // Returns true if the event was actually processed. |
| 307 bool keyEventDefault(const WebKeyboardEvent&); | 319 bool keyEventDefault(const WebKeyboardEvent&); |
| 308 | 320 |
| 309 // Returns true if the autocomple has consumed the event. | 321 // Returns true if the autocomple has consumed the event. |
| 310 bool autocompleteHandleKeyEvent(const WebKeyboardEvent&); | 322 bool autocompleteHandleKeyEvent(const WebKeyboardEvent&); |
| 311 | 323 |
| 312 // Repaints the suggestions popup. Should be called when the suggestions | 324 // Repaints the suggestions popup. Should be called when the suggestions |
| 313 // have changed. Note that this should only be called when the suggestions | 325 // have changed. Note that this should only be called when the suggestions |
| 314 // popup is showing. | 326 // popup is showing. |
| 315 void refreshSuggestionsPopup(); | 327 void refreshSuggestionsPopup(); |
| 316 | 328 |
| 317 // Returns true if the view was scrolled. | 329 // Returns true if the view was scrolled. |
| 318 bool scrollViewWithKeyboard(int keyCode, int modifiers); | 330 bool scrollViewWithKeyboard(int keyCode, int modifiers); |
| 319 | 331 |
| 320 // Converts |pos| from window coordinates to contents coordinates and gets | 332 // Converts |pos| from window coordinates to contents coordinates and gets |
| 321 // the HitTestResult for it. | 333 // the HitTestResult for it. |
| 322 WebCore::HitTestResult hitTestResultForWindowPos(const WebCore::IntPoint&); | 334 WebCore::HitTestResult hitTestResultForWindowPos(const WebCore::IntPoint&); |
| 323 | 335 |
| 336 #if USE(ACCELERATED_COMPOSITING) |
| 337 void setAcceleratedCompositing(bool); |
| 338 bool isAcceleratedCompositing() { return m_isAcceleratedCompositing; } |
| 339 void updateRootLayerContents(const WebRect& rect); |
| 340 #endif |
| 341 |
| 324 WebViewClient* m_client; | 342 WebViewClient* m_client; |
| 325 | 343 |
| 326 BackForwardListClientImpl m_backForwardListClientImpl; | 344 BackForwardListClientImpl m_backForwardListClientImpl; |
| 327 ChromeClientImpl m_chromeClientImpl; | 345 ChromeClientImpl m_chromeClientImpl; |
| 328 ContextMenuClientImpl m_contextMenuClientImpl; | 346 ContextMenuClientImpl m_contextMenuClientImpl; |
| 329 DragClientImpl m_dragClientImpl; | 347 DragClientImpl m_dragClientImpl; |
| 330 EditorClientImpl m_editorClientImpl; | 348 EditorClientImpl m_editorClientImpl; |
| 331 InspectorClientImpl m_inspectorClientImpl; | 349 InspectorClientImpl m_inspectorClientImpl; |
| 332 | 350 |
| 333 WebSize m_size; | 351 WebSize m_size; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 bool m_tabsToLinks; | 457 bool m_tabsToLinks; |
| 440 | 458 |
| 441 // Inspector settings. | 459 // Inspector settings. |
| 442 WebString m_inspectorSettings; | 460 WebString m_inspectorSettings; |
| 443 | 461 |
| 444 #if ENABLE(NOTIFICATIONS) | 462 #if ENABLE(NOTIFICATIONS) |
| 445 // The provider of desktop notifications; | 463 // The provider of desktop notifications; |
| 446 NotificationPresenterImpl m_notificationPresenter; | 464 NotificationPresenterImpl m_notificationPresenter; |
| 447 #endif | 465 #endif |
| 448 | 466 |
| 467 #if USE(ACCELERATED_COMPOSITING) |
| 468 OwnPtr<WebCore::LayerRendererSkia> m_layerRenderer; |
| 469 bool m_isAcceleratedCompositing; |
| 470 #endif |
| 471 |
| 449 static const WebInputEvent* m_currentInputEvent; | 472 static const WebInputEvent* m_currentInputEvent; |
| 450 }; | 473 }; |
| 451 | 474 |
| 452 } // namespace WebKit | 475 } // namespace WebKit |
| 453 | 476 |
| 454 #endif | 477 #endif |
| OLD | NEW |