| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "public/platform/WebRect.h" | 48 #include "public/platform/WebRect.h" |
| 49 #include "public/platform/WebSize.h" | 49 #include "public/platform/WebSize.h" |
| 50 #include "public/platform/WebString.h" | 50 #include "public/platform/WebString.h" |
| 51 #include "public/platform/WebVector.h" | 51 #include "public/platform/WebVector.h" |
| 52 #include "public/web/WebInputEvent.h" | 52 #include "public/web/WebInputEvent.h" |
| 53 #include "public/web/WebNavigationPolicy.h" | 53 #include "public/web/WebNavigationPolicy.h" |
| 54 #include "public/web/WebPageImportanceSignals.h" | 54 #include "public/web/WebPageImportanceSignals.h" |
| 55 #include "public/web/WebView.h" | 55 #include "public/web/WebView.h" |
| 56 #include "web/ChromeClientImpl.h" | 56 #include "web/ChromeClientImpl.h" |
| 57 #include "web/ContextMenuClientImpl.h" | 57 #include "web/ContextMenuClientImpl.h" |
| 58 #include "web/DragClientImpl.h" | |
| 59 #include "web/EditorClientImpl.h" | 58 #include "web/EditorClientImpl.h" |
| 60 #include "web/MediaKeysClientImpl.h" | 59 #include "web/MediaKeysClientImpl.h" |
| 61 #include "web/PageWidgetDelegate.h" | 60 #include "web/PageWidgetDelegate.h" |
| 62 #include "web/SpellCheckerClientImpl.h" | 61 #include "web/SpellCheckerClientImpl.h" |
| 63 #include "web/StorageClientImpl.h" | 62 #include "web/StorageClientImpl.h" |
| 64 #include "web/WebExport.h" | 63 #include "web/WebExport.h" |
| 65 #include "wtf/Compiler.h" | 64 #include "wtf/Compiler.h" |
| 66 #include "wtf/HashSet.h" | 65 #include "wtf/HashSet.h" |
| 67 #include "wtf/OwnPtr.h" | 66 #include "wtf/OwnPtr.h" |
| 68 #include "wtf/RefCounted.h" | 67 #include "wtf/RefCounted.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 void setBackgroundColorOverride(WebColor); | 290 void setBackgroundColorOverride(WebColor); |
| 292 void setZoomFactorOverride(float); | 291 void setZoomFactorOverride(float); |
| 293 void updateShowFPSCounter(); | 292 void updateShowFPSCounter(); |
| 294 void setCompositorDeviceScaleFactorOverride(float); | 293 void setCompositorDeviceScaleFactorOverride(float); |
| 295 void setRootLayerTransform(const WebSize& offset, float scale); | 294 void setRootLayerTransform(const WebSize& offset, float scale); |
| 296 | 295 |
| 297 Color baseBackgroundColor() const { return m_baseBackgroundColor; } | 296 Color baseBackgroundColor() const { return m_baseBackgroundColor; } |
| 298 | 297 |
| 299 WebColor backgroundColorOverride() const { return m_backgroundColorOverride;
} | 298 WebColor backgroundColorOverride() const { return m_backgroundColorOverride;
} |
| 300 | 299 |
| 301 const WebPoint& lastMouseDownPoint() const | |
| 302 { | |
| 303 return m_lastMouseDownPoint; | |
| 304 } | |
| 305 | |
| 306 Frame* focusedCoreFrame() const; | 300 Frame* focusedCoreFrame() const; |
| 307 | 301 |
| 308 // Returns the currently focused Element or null if no element has focus. | 302 // Returns the currently focused Element or null if no element has focus. |
| 309 Element* focusedElement() const; | 303 Element* focusedElement() const; |
| 310 | 304 |
| 311 static WebViewImpl* fromPage(Page*); | 305 static WebViewImpl* fromPage(Page*); |
| 312 | 306 |
| 313 WebViewClient* client() | 307 WebViewClient* client() |
| 314 { | 308 { |
| 315 return m_client; | 309 return m_client; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 void cancelPagePopup(); | 617 void cancelPagePopup(); |
| 624 void updatePageOverlays(); | 618 void updatePageOverlays(); |
| 625 | 619 |
| 626 float deviceScaleFactor() const; | 620 float deviceScaleFactor() const; |
| 627 | 621 |
| 628 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) | 622 WebViewClient* m_client; // Can be 0 (e.g. unittests, shared workers, etc.) |
| 629 WebSpellCheckClient* m_spellCheckClient; | 623 WebSpellCheckClient* m_spellCheckClient; |
| 630 | 624 |
| 631 Persistent<ChromeClientImpl> m_chromeClientImpl; | 625 Persistent<ChromeClientImpl> m_chromeClientImpl; |
| 632 ContextMenuClientImpl m_contextMenuClientImpl; | 626 ContextMenuClientImpl m_contextMenuClientImpl; |
| 633 DragClientImpl m_dragClientImpl; | |
| 634 EditorClientImpl m_editorClientImpl; | 627 EditorClientImpl m_editorClientImpl; |
| 635 SpellCheckerClientImpl m_spellCheckerClientImpl; | 628 SpellCheckerClientImpl m_spellCheckerClientImpl; |
| 636 StorageClientImpl m_storageClientImpl; | 629 StorageClientImpl m_storageClientImpl; |
| 637 | 630 |
| 638 WebSize m_size; | 631 WebSize m_size; |
| 639 // If true, automatically resize the layout view around its content. | 632 // If true, automatically resize the layout view around its content. |
| 640 bool m_shouldAutoResize; | 633 bool m_shouldAutoResize; |
| 641 // The lower bound on the size when auto-resizing. | 634 // The lower bound on the size when auto-resizing. |
| 642 IntSize m_minAutoSize; | 635 IntSize m_minAutoSize; |
| 643 // The upper bound on the size when auto-resizing. | 636 // The upper bound on the size when auto-resizing. |
| 644 IntSize m_maxAutoSize; | 637 IntSize m_maxAutoSize; |
| 645 | 638 |
| 646 Persistent<Page> m_page; | 639 Persistent<Page> m_page; |
| 647 | 640 |
| 648 // An object that can be used to manipulate m_page->settings() without linki
ng | 641 // An object that can be used to manipulate m_page->settings() without linki
ng |
| 649 // against WebCore. This is lazily allocated the first time GetWebSettings() | 642 // against WebCore. This is lazily allocated the first time GetWebSettings() |
| 650 // is called. | 643 // is called. |
| 651 OwnPtr<WebSettingsImpl> m_webSettings; | 644 OwnPtr<WebSettingsImpl> m_webSettings; |
| 652 | 645 |
| 653 // A copy of the web drop data object we received from the browser. | 646 // A copy of the web drop data object we received from the browser. |
| 654 Persistent<DataObject> m_currentDragData; | 647 Persistent<DataObject> m_currentDragData; |
| 655 | 648 |
| 656 // The point relative to the client area where the mouse was last pressed | |
| 657 // down. This is used by the drag client to determine what was under the | |
| 658 // mouse when the drag was initiated. We need to track this here in | |
| 659 // WebViewImpl since DragClient::startDrag does not pass the position the | |
| 660 // mouse was at when the drag was initiated, only the current point, which | |
| 661 // can be misleading as it is usually not over the element the user actually | |
| 662 // dragged by the time a drag is initiated. | |
| 663 WebPoint m_lastMouseDownPoint; | |
| 664 | |
| 665 // Keeps track of the current zoom level. 0 means no zoom, positive numbers | 649 // Keeps track of the current zoom level. 0 means no zoom, positive numbers |
| 666 // mean zoom in, negative numbers mean zoom out. | 650 // mean zoom in, negative numbers mean zoom out. |
| 667 double m_zoomLevel; | 651 double m_zoomLevel; |
| 668 | 652 |
| 669 double m_minimumZoomLevel; | 653 double m_minimumZoomLevel; |
| 670 | 654 |
| 671 double m_maximumZoomLevel; | 655 double m_maximumZoomLevel; |
| 672 | 656 |
| 673 // Additional zoom factor used to scale the content by device scale factor. | 657 // Additional zoom factor used to scale the content by device scale factor. |
| 674 double m_zoomFactorForDeviceScaleFactor; | 658 double m_zoomFactorForDeviceScaleFactor; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 }; | 755 }; |
| 772 | 756 |
| 773 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); | 757 DEFINE_TYPE_CASTS(WebViewImpl, WebWidget, widget, widget->isWebView(), widget.is
WebView()); |
| 774 // We have no ways to check if the specified WebView is an instance of | 758 // We have no ways to check if the specified WebView is an instance of |
| 775 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 759 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 776 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 760 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 777 | 761 |
| 778 } // namespace blink | 762 } // namespace blink |
| 779 | 763 |
| 780 #endif | 764 #endif |
| OLD | NEW |