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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 490 | 490 |
| 491 PageScaleConstraintsSet& GetPageScaleConstraintsSet() const override; | 491 PageScaleConstraintsSet& GetPageScaleConstraintsSet() const override; |
| 492 | 492 |
| 493 FloatSize ElasticOverscroll() const override { return elastic_overscroll_; } | 493 FloatSize ElasticOverscroll() const override { return elastic_overscroll_; } |
| 494 | 494 |
| 495 double LastFrameTimeMonotonic() const override { | 495 double LastFrameTimeMonotonic() const override { |
| 496 return last_frame_time_monotonic_; | 496 return last_frame_time_monotonic_; |
| 497 } | 497 } |
| 498 | 498 |
| 499 class ChromeClient& ChromeClient() const override { | 499 class ChromeClient& ChromeClient() const override { |
| 500 return *chrome_client_impl_.Get(); | 500 return *chrome_client_.Get(); |
| 501 } | 501 } |
| 502 | 502 |
| 503 // Returns the currently active WebInputMethodController which is the one | 503 // Returns the currently active WebInputMethodController which is the one |
| 504 // corresponding to the focused frame. It will return nullptr if there is no | 504 // corresponding to the focused frame. It will return nullptr if there is no |
| 505 // focused frame, or if the there is one but it belongs to a different local | 505 // focused frame, or if the there is one but it belongs to a different local |
| 506 // root. | 506 // root. |
| 507 WebInputMethodControllerImpl* GetActiveWebInputMethodController() const; | 507 WebInputMethodControllerImpl* GetActiveWebInputMethodController() const; |
| 508 | 508 |
| 509 void SetLastHiddenPagePopup(WebPagePopupImpl* page_popup) override { | 509 void SetLastHiddenPagePopup(WebPagePopupImpl* page_popup) override { |
| 510 last_hidden_page_popup_ = page_popup; | 510 last_hidden_page_popup_ = page_popup; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 596 void DetachCompositorAnimationTimeline(CompositorAnimationTimeline*); | 596 void DetachCompositorAnimationTimeline(CompositorAnimationTimeline*); |
| 597 | 597 |
| 598 LocalFrame* FocusedLocalFrameInWidget() const; | 598 LocalFrame* FocusedLocalFrameInWidget() const; |
| 599 LocalFrame* FocusedLocalFrameAvailableForIme() const; | 599 LocalFrame* FocusedLocalFrameAvailableForIme() const; |
| 600 | 600 |
| 601 CompositorMutatorImpl& Mutator(); | 601 CompositorMutatorImpl& Mutator(); |
| 602 | 602 |
| 603 WebViewClient* client_; // Can be 0 (e.g. unittests, shared workers, etc.) | 603 WebViewClient* client_; // Can be 0 (e.g. unittests, shared workers, etc.) |
| 604 WebSpellCheckClient* spell_check_client_; | 604 WebSpellCheckClient* spell_check_client_; |
| 605 | 605 |
| 606 Persistent<ChromeClientImpl> chrome_client_impl_; | 606 // ChromeClient needs blink:: qualifier so it doesn't clash with ChromeClient |
| 607 // method. | |
|
dcheng
2017/05/29 08:02:30
Huh... maybe let's just rename ChromeClient() to G
sashab
2017/05/30 02:56:18
Oh yeah, forgot about the Get prefix trick :) Will
| |
| 608 Persistent<blink::ChromeClient> chrome_client_; | |
| 607 ContextMenuClientImpl context_menu_client_impl_; | 609 ContextMenuClientImpl context_menu_client_impl_; |
| 608 EditorClientImpl editor_client_impl_; | 610 EditorClientImpl editor_client_impl_; |
| 609 SpellCheckerClientImpl spell_checker_client_impl_; | 611 SpellCheckerClientImpl spell_checker_client_impl_; |
| 610 StorageClientImpl storage_client_impl_; | 612 StorageClientImpl storage_client_impl_; |
| 611 | 613 |
| 612 WebSize size_; | 614 WebSize size_; |
| 613 // If true, automatically resize the layout view around its content. | 615 // If true, automatically resize the layout view around its content. |
| 614 bool should_auto_resize_; | 616 bool should_auto_resize_; |
| 615 // The lower bound on the size when auto-resizing. | 617 // The lower bound on the size when auto-resizing. |
| 616 IntSize min_auto_size_; | 618 IntSize min_auto_size_; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 743 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; | 745 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; |
| 744 }; | 746 }; |
| 745 | 747 |
| 746 // We have no ways to check if the specified WebView is an instance of | 748 // We have no ways to check if the specified WebView is an instance of |
| 747 // WebViewImpl because WebViewImpl is the only implementation of WebView. | 749 // WebViewImpl because WebViewImpl is the only implementation of WebView. |
| 748 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); | 750 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); |
| 749 | 751 |
| 750 } // namespace blink | 752 } // namespace blink |
| 751 | 753 |
| 752 #endif | 754 #endif |
| OLD | NEW |