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 16 matching lines...) Expand all Loading... | |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebViewImpl_h | 31 #ifndef WebViewImpl_h |
| 32 #define WebViewImpl_h | 32 #define WebViewImpl_h |
| 33 | 33 |
| 34 #include <memory> | 34 #include <memory> |
| 35 #include "core/exported/WebViewBase.h" | 35 #include "core/exported/WebViewBase.h" |
| 36 #include "core/frame/ResizeViewportAnchor.h" | 36 #include "core/frame/ResizeViewportAnchor.h" |
| 37 #include "core/page/ChromeClient.h" | |
| 37 #include "core/page/ContextMenuProvider.h" | 38 #include "core/page/ContextMenuProvider.h" |
| 38 #include "core/page/EventWithHitTestResults.h" | 39 #include "core/page/EventWithHitTestResults.h" |
| 39 #include "platform/animation/CompositorAnimationTimeline.h" | 40 #include "platform/animation/CompositorAnimationTimeline.h" |
| 40 #include "platform/geometry/IntPoint.h" | 41 #include "platform/geometry/IntPoint.h" |
| 41 #include "platform/geometry/IntRect.h" | 42 #include "platform/geometry/IntRect.h" |
| 42 #include "platform/graphics/GraphicsLayer.h" | 43 #include "platform/graphics/GraphicsLayer.h" |
| 43 #include "platform/graphics/TouchAction.h" | 44 #include "platform/graphics/TouchAction.h" |
| 44 #include "platform/heap/Handle.h" | 45 #include "platform/heap/Handle.h" |
| 45 #include "platform/scheduler/child/web_scheduler.h" | 46 #include "platform/scheduler/child/web_scheduler.h" |
| 46 #include "platform/wtf/Compiler.h" | 47 #include "platform/wtf/Compiler.h" |
| 47 #include "platform/wtf/HashSet.h" | 48 #include "platform/wtf/HashSet.h" |
| 48 #include "platform/wtf/Vector.h" | 49 #include "platform/wtf/Vector.h" |
| 49 #include "public/platform/WebDisplayMode.h" | 50 #include "public/platform/WebDisplayMode.h" |
| 50 #include "public/platform/WebFloatSize.h" | 51 #include "public/platform/WebFloatSize.h" |
| 51 #include "public/platform/WebGestureCurveTarget.h" | 52 #include "public/platform/WebGestureCurveTarget.h" |
| 52 #include "public/platform/WebGestureEvent.h" | 53 #include "public/platform/WebGestureEvent.h" |
| 53 #include "public/platform/WebInputEvent.h" | 54 #include "public/platform/WebInputEvent.h" |
| 54 #include "public/platform/WebInputEventResult.h" | 55 #include "public/platform/WebInputEventResult.h" |
| 55 #include "public/platform/WebLayer.h" | 56 #include "public/platform/WebLayer.h" |
| 56 #include "public/platform/WebPoint.h" | 57 #include "public/platform/WebPoint.h" |
| 57 #include "public/platform/WebRect.h" | 58 #include "public/platform/WebRect.h" |
| 58 #include "public/platform/WebSize.h" | 59 #include "public/platform/WebSize.h" |
| 59 #include "public/platform/WebString.h" | 60 #include "public/platform/WebString.h" |
| 60 #include "public/platform/WebVector.h" | 61 #include "public/platform/WebVector.h" |
| 61 #include "public/web/WebNavigationPolicy.h" | 62 #include "public/web/WebNavigationPolicy.h" |
| 62 #include "public/web/WebPageImportanceSignals.h" | 63 #include "public/web/WebPageImportanceSignals.h" |
| 63 #include "web/ChromeClientImpl.h" | |
| 64 #include "web/ContextMenuClientImpl.h" | 64 #include "web/ContextMenuClientImpl.h" |
| 65 #include "web/EditorClientImpl.h" | 65 #include "web/EditorClientImpl.h" |
| 66 #include "web/MediaKeysClientImpl.h" | 66 #include "web/MediaKeysClientImpl.h" |
| 67 #include "web/PageWidgetDelegate.h" | 67 #include "web/PageWidgetDelegate.h" |
| 68 #include "web/SpellCheckerClientImpl.h" | 68 #include "web/SpellCheckerClientImpl.h" |
| 69 #include "web/StorageClientImpl.h" | 69 #include "web/StorageClientImpl.h" |
| 70 #include "web/WebExport.h" | 70 #include "web/WebExport.h" |
| 71 #include "web/WebPagePopupImpl.h" | 71 #include "web/WebPagePopupImpl.h" |
| 72 | 72 |
| 73 namespace blink { | 73 namespace blink { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 | 491 |
| 492 PageScaleConstraintsSet& GetPageScaleConstraintsSet() const override; | 492 PageScaleConstraintsSet& GetPageScaleConstraintsSet() const override; |
| 493 | 493 |
| 494 FloatSize ElasticOverscroll() const override { return elastic_overscroll_; } | 494 FloatSize ElasticOverscroll() const override { return elastic_overscroll_; } |
| 495 | 495 |
| 496 double LastFrameTimeMonotonic() const override { | 496 double LastFrameTimeMonotonic() const override { |
| 497 return last_frame_time_monotonic_; | 497 return last_frame_time_monotonic_; |
| 498 } | 498 } |
| 499 | 499 |
| 500 class ChromeClient& ChromeClient() const override { | 500 class ChromeClient& ChromeClient() const override { |
| 501 return *chrome_client_impl_.Get(); | 501 return *chrome_client_.Get(); |
| 502 } | 502 } |
| 503 | 503 |
| 504 // Returns the currently active WebInputMethodController which is the one | 504 // Returns the currently active WebInputMethodController which is the one |
| 505 // corresponding to the focused frame. It will return nullptr if there is no | 505 // corresponding to the focused frame. It will return nullptr if there is no |
| 506 // focused frame, or if the there is one but it belongs to a different local | 506 // focused frame, or if the there is one but it belongs to a different local |
| 507 // root. | 507 // root. |
| 508 WebInputMethodControllerImpl* GetActiveWebInputMethodController() const; | 508 WebInputMethodControllerImpl* GetActiveWebInputMethodController() const; |
| 509 | 509 |
| 510 void SetLastHiddenPagePopup(WebPagePopupImpl* page_popup) override { | 510 void SetLastHiddenPagePopup(WebPagePopupImpl* page_popup) override { |
| 511 last_hidden_page_popup_ = page_popup; | 511 last_hidden_page_popup_ = page_popup; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 599 void DetachCompositorAnimationTimeline(CompositorAnimationTimeline*); | 599 void DetachCompositorAnimationTimeline(CompositorAnimationTimeline*); |
| 600 | 600 |
| 601 LocalFrame* FocusedLocalFrameInWidget() const; | 601 LocalFrame* FocusedLocalFrameInWidget() const; |
| 602 LocalFrame* FocusedLocalFrameAvailableForIme() const; | 602 LocalFrame* FocusedLocalFrameAvailableForIme() const; |
| 603 | 603 |
| 604 CompositorMutatorImpl& Mutator(); | 604 CompositorMutatorImpl& Mutator(); |
| 605 | 605 |
| 606 WebViewClient* client_; // Can be 0 (e.g. unittests, shared workers, etc.) | 606 WebViewClient* client_; // Can be 0 (e.g. unittests, shared workers, etc.) |
| 607 WebSpellCheckClient* spell_check_client_; | 607 WebSpellCheckClient* spell_check_client_; |
| 608 | 608 |
| 609 Persistent<ChromeClientImpl> chrome_client_impl_; | 609 Persistent<blink::ChromeClient> chrome_client_; |
|
haraken
2017/05/23 01:56:35
Drop blink::.
sashab
2017/05/29 04:34:01
Can't, name clash with method above :( Added comme
| |
| 610 ContextMenuClientImpl context_menu_client_impl_; | 610 ContextMenuClientImpl context_menu_client_impl_; |
| 611 EditorClientImpl editor_client_impl_; | 611 EditorClientImpl editor_client_impl_; |
| 612 SpellCheckerClientImpl spell_checker_client_impl_; | 612 SpellCheckerClientImpl spell_checker_client_impl_; |
| 613 StorageClientImpl storage_client_impl_; | 613 StorageClientImpl storage_client_impl_; |
| 614 | 614 |
| 615 WebSize size_; | 615 WebSize size_; |
| 616 // If true, automatically resize the layout view around its content. | 616 // If true, automatically resize the layout view around its content. |
| 617 bool should_auto_resize_; | 617 bool should_auto_resize_; |
| 618 // The lower bound on the size when auto-resizing. | 618 // The lower bound on the size when auto-resizing. |
| 619 IntSize min_auto_size_; | 619 IntSize min_auto_size_; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 746 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; | 746 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; |
| 747 }; | 747 }; |
| 748 | 748 |
| 749 // We have no ways to check if the specified WebView is an instance of | 749 // We have no ways to check if the specified WebView is an instance of |
| 750 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 750 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 751 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 751 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 752 | 752 |
| 753 } // namespace blink | 753 } // namespace blink |
| 754 | 754 |
| 755 #endif | 755 #endif |
| OLD | NEW |