Chromium Code Reviews| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 | 382 |
| 383 bool shouldAutoResize() const { return m_shouldAutoResize; } | 383 bool shouldAutoResize() const { return m_shouldAutoResize; } |
| 384 | 384 |
| 385 IntSize minAutoSize() const { return m_minAutoSize; } | 385 IntSize minAutoSize() const { return m_minAutoSize; } |
| 386 | 386 |
| 387 IntSize maxAutoSize() const { return m_maxAutoSize; } | 387 IntSize maxAutoSize() const { return m_maxAutoSize; } |
| 388 | 388 |
| 389 void updateMainFrameLayoutSize(); | 389 void updateMainFrameLayoutSize(); |
| 390 void updatePageDefinedViewportConstraints(const ViewportDescription&); | 390 void updatePageDefinedViewportConstraints(const ViewportDescription&); |
| 391 | 391 |
| 392 // Start a system drag and drop operation. | |
| 393 void startDragging(LocalFrame*, | |
| 394 const WebDragData& dragData, | |
| 395 WebDragOperationsMask mask, | |
| 396 const WebImage& dragImage, | |
| 397 const WebPoint& dragImageOffset); | |
| 398 | |
| 399 PagePopup* openPagePopup(PagePopupClient*); | 392 PagePopup* openPagePopup(PagePopupClient*); |
| 400 void closePagePopup(PagePopup*); | 393 void closePagePopup(PagePopup*); |
| 401 void cleanupPagePopup(); | 394 void cleanupPagePopup(); |
| 402 LocalDOMWindow* pagePopupWindow() const; | 395 LocalDOMWindow* pagePopupWindow() const; |
| 403 | 396 |
| 404 // Returns the input event we're currently processing. This is used in some | 397 // Returns the input event we're currently processing. This is used in some |
| 405 // cases where the WebCore DOM event doesn't have the information we need. | 398 // cases where the WebCore DOM event doesn't have the information we need. |
| 406 static const WebInputEvent* currentInputEvent() { | 399 static const WebInputEvent* currentInputEvent() { |
| 407 return m_currentInputEvent; | 400 return m_currentInputEvent; |
| 408 } | 401 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 504 | 497 |
| 505 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } | 498 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } |
| 506 | 499 |
| 507 bool isTransparent() const; | 500 bool isTransparent() const; |
| 508 void setIsTransparent(bool value); | 501 void setIsTransparent(bool value); |
| 509 | 502 |
| 510 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } | 503 double lastFrameTimeMonotonic() const { return m_lastFrameTimeMonotonic; } |
| 511 | 504 |
| 512 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } | 505 ChromeClientImpl& chromeClient() const { return *m_chromeClientImpl.get(); } |
| 513 | 506 |
| 507 // TODO(paulmeyer): Move this to WebWidget once all drag-and-drop functions | |
| 508 // are there. | |
| 509 bool m_doingDragAndDrop; | |
|
dcheng
2016/11/03 21:22:52
Let's add a setter for this instead of directly ma
paulmeyer
2016/11/04 19:01:18
Done.
| |
| 510 | |
| 514 private: | 511 private: |
| 515 InspectorOverlay* inspectorOverlay(); | 512 InspectorOverlay* inspectorOverlay(); |
| 516 | 513 |
| 517 void setPageScaleFactorAndLocation(float, const FloatPoint&); | 514 void setPageScaleFactorAndLocation(float, const FloatPoint&); |
| 518 void propagateZoomFactorToLocalFrameRoots(Frame*, float); | 515 void propagateZoomFactorToLocalFrameRoots(Frame*, float); |
| 519 | 516 |
| 520 void scrollAndRescaleViewports(float scaleFactor, | 517 void scrollAndRescaleViewports(float scaleFactor, |
| 521 const IntPoint& mainFrameOrigin, | 518 const IntPoint& mainFrameOrigin, |
| 522 const FloatPoint& visualViewportOrigin); | 519 const FloatPoint& visualViewportOrigin); |
| 523 | 520 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 662 float m_doubleTapZoomPageScaleFactor; | 659 float m_doubleTapZoomPageScaleFactor; |
| 663 // Have we sent a double-tap zoom and not yet heard back the scale? | 660 // Have we sent a double-tap zoom and not yet heard back the scale? |
| 664 bool m_doubleTapZoomPending; | 661 bool m_doubleTapZoomPending; |
| 665 | 662 |
| 666 // Used for testing purposes. | 663 // Used for testing purposes. |
| 667 bool m_enableFakePageScaleAnimationForTesting; | 664 bool m_enableFakePageScaleAnimationForTesting; |
| 668 IntPoint m_fakePageScaleAnimationTargetPosition; | 665 IntPoint m_fakePageScaleAnimationTargetPosition; |
| 669 float m_fakePageScaleAnimationPageScaleFactor; | 666 float m_fakePageScaleAnimationPageScaleFactor; |
| 670 bool m_fakePageScaleAnimationUseAnchor; | 667 bool m_fakePageScaleAnimationUseAnchor; |
| 671 | 668 |
| 672 bool m_doingDragAndDrop; | |
| 673 | |
| 674 bool m_ignoreInputEvents; | 669 bool m_ignoreInputEvents; |
| 675 | 670 |
| 676 float m_compositorDeviceScaleFactorOverride; | 671 float m_compositorDeviceScaleFactorOverride; |
| 677 TransformationMatrix m_deviceEmulationTransform; | 672 TransformationMatrix m_deviceEmulationTransform; |
| 678 | 673 |
| 679 // Webkit expects keyPress events to be suppressed if the associated keyDown | 674 // Webkit expects keyPress events to be suppressed if the associated keyDown |
| 680 // event was handled. Safari implements this behavior by peeking out the | 675 // event was handled. Safari implements this behavior by peeking out the |
| 681 // associated WM_CHAR event if the keydown was handled. We emulate | 676 // associated WM_CHAR event if the keydown was handled. We emulate |
| 682 // this behavior by setting this flag if the keyDown was handled. | 677 // this behavior by setting this flag if the keyDown was handled. |
| 683 bool m_suppressNextKeypressEvent; | 678 bool m_suppressNextKeypressEvent; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; | 757 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; |
| 763 }; | 758 }; |
| 764 | 759 |
| 765 // We have no ways to check if the specified WebView is an instance of | 760 // We have no ways to check if the specified WebView is an instance of |
| 766 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 761 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 767 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 762 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 768 | 763 |
| 769 } // namespace blink | 764 } // namespace blink |
| 770 | 765 |
| 771 #endif | 766 #endif |
| OLD | NEW |