Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.h

Issue 2896563002: Update WebLocalFrameImpl with WebLocalFrameBase to break dependencies. (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 class PageOverlay; 81 class PageOverlay;
82 class PageScaleConstraintsSet; 82 class PageScaleConstraintsSet;
83 class PaintLayerCompositor; 83 class PaintLayerCompositor;
84 class UserGestureToken; 84 class UserGestureToken;
85 class WebActiveGestureAnimation; 85 class WebActiveGestureAnimation;
86 class WebDevToolsAgentImpl; 86 class WebDevToolsAgentImpl;
87 class WebElement; 87 class WebElement;
88 class WebInputMethodControllerImpl; 88 class WebInputMethodControllerImpl;
89 class WebLayerTreeView; 89 class WebLayerTreeView;
90 class WebLocalFrame; 90 class WebLocalFrame;
91 class WebLocalFrameImpl; 91 class WebLocalFrameBase;
92 class CompositorMutatorImpl; 92 class CompositorMutatorImpl;
93 class WebRemoteFrame; 93 class WebRemoteFrame;
94 class WebSettingsImpl; 94 class WebSettingsImpl;
95 class WebViewScheduler; 95 class WebViewScheduler;
96 96
97 class WEB_EXPORT WebViewImpl final 97 class WEB_EXPORT WebViewImpl final
98 : NON_EXPORTED_BASE(public WebViewBase), 98 : NON_EXPORTED_BASE(public WebViewBase),
99 NON_EXPORTED_BASE(public WebGestureCurveTarget), 99 NON_EXPORTED_BASE(public WebGestureCurveTarget),
100 public PageWidgetEventHandler, 100 public PageWidgetEventHandler,
101 public WebScheduler::InterventionReporter, 101 public WebScheduler::InterventionReporter,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 Page* GetPage() const override { return page_.Get(); } 302 Page* GetPage() const override { return page_.Get(); }
303 303
304 WebDevToolsAgentImpl* MainFrameDevToolsAgentImpl(); 304 WebDevToolsAgentImpl* MainFrameDevToolsAgentImpl();
305 305
306 DevToolsEmulator* GetDevToolsEmulator() const override { 306 DevToolsEmulator* GetDevToolsEmulator() const override {
307 return dev_tools_emulator_.Get(); 307 return dev_tools_emulator_.Get();
308 } 308 }
309 309
310 // Returns the main frame associated with this view. This may be null when 310 // Returns the main frame associated with this view. This may be null when
311 // the page is shutting down, but will be valid at all other times. 311 // the page is shutting down, but will be valid at all other times.
312 WebLocalFrameImpl* MainFrameImpl() const override; 312 WebLocalFrameBase* MainFrameImpl() const override;
313 313
314 // Event related methods: 314 // Event related methods:
315 void MouseContextMenu(const WebMouseEvent&); 315 void MouseContextMenu(const WebMouseEvent&);
316 void MouseDoubleClick(const WebMouseEvent&); 316 void MouseDoubleClick(const WebMouseEvent&);
317 317
318 bool StartPageScaleAnimation(const IntPoint& target_position, 318 bool StartPageScaleAnimation(const IntPoint& target_position,
319 bool use_anchor, 319 bool use_anchor,
320 float new_scale, 320 float new_scale,
321 double duration_in_seconds); 321 double duration_in_seconds);
322 322
(...skipping 18 matching lines...) Expand all
341 // load. isNavigationWithinPage will be true if the navigation does 341 // load. isNavigationWithinPage will be true if the navigation does
342 // not take the user away from the current page. 342 // not take the user away from the current page.
343 void DidCommitLoad(bool is_new_navigation, 343 void DidCommitLoad(bool is_new_navigation,
344 bool is_navigation_within_page) override; 344 bool is_navigation_within_page) override;
345 345
346 // Indicates two things: 346 // Indicates two things:
347 // 1) This view may have a new layout now. 347 // 1) This view may have a new layout now.
348 // 2) Calling updateAllLifecyclePhases() is a no-op. 348 // 2) Calling updateAllLifecyclePhases() is a no-op.
349 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this 349 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this
350 // notification unless the view did not need a layout. 350 // notification unless the view did not need a layout.
351 void LayoutUpdated(WebLocalFrameImpl*) override; 351 void LayoutUpdated(WebLocalFrameBase*) override;
352 void ResizeAfterLayout(WebLocalFrameImpl*) override; 352 void ResizeAfterLayout(WebLocalFrameBase*) override;
353 353
354 void DidChangeContentsSize() override; 354 void DidChangeContentsSize() override;
355 void PageScaleFactorChanged() override; 355 void PageScaleFactorChanged() override;
356 void MainFrameScrollOffsetChanged() override; 356 void MainFrameScrollOffsetChanged() override;
357 357
358 // Returns true if popup menus should be rendered by the browser, false if 358 // Returns true if popup menus should be rendered by the browser, false if
359 // they should be rendered by WebKit (which is the default). 359 // they should be rendered by WebKit (which is the default).
360 static bool UseExternalPopupMenus(); 360 static bool UseExternalPopupMenus();
361 361
362 bool ShouldAutoResize() const override { return should_auto_resize_; } 362 bool ShouldAutoResize() const override { return should_auto_resize_; }
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 WebInputEventResult HandleGestureEvent(const WebGestureEvent&) override; 575 WebInputEventResult HandleGestureEvent(const WebGestureEvent&) override;
576 WebInputEventResult HandleKeyEvent(const WebKeyboardEvent&) override; 576 WebInputEventResult HandleKeyEvent(const WebKeyboardEvent&) override;
577 WebInputEventResult HandleCharEvent(const WebKeyboardEvent&) override; 577 WebInputEventResult HandleCharEvent(const WebKeyboardEvent&) override;
578 578
579 WebInputEventResult HandleSyntheticWheelFromTouchpadPinchEvent( 579 WebInputEventResult HandleSyntheticWheelFromTouchpadPinchEvent(
580 const WebGestureEvent&); 580 const WebGestureEvent&);
581 581
582 WebGestureEvent CreateGestureScrollEventFromFling(WebInputEvent::Type, 582 WebGestureEvent CreateGestureScrollEventFromFling(WebInputEvent::Type,
583 WebGestureDevice) const; 583 WebGestureDevice) const;
584 584
585 void EnablePopupMouseWheelEventListener(WebLocalFrameImpl* local_root); 585 void EnablePopupMouseWheelEventListener(WebLocalFrameBase* local_root);
586 void DisablePopupMouseWheelEventListener(); 586 void DisablePopupMouseWheelEventListener();
587 587
588 void CancelPagePopup(); 588 void CancelPagePopup();
589 void UpdatePageOverlays(); 589 void UpdatePageOverlays();
590 590
591 float DeviceScaleFactor() const; 591 float DeviceScaleFactor() const;
592 592
593 void SetRootGraphicsLayer(GraphicsLayer*) override; 593 void SetRootGraphicsLayer(GraphicsLayer*) override;
594 void SetRootLayer(WebLayer*) override; 594 void SetRootLayer(WebLayer*) override;
595 void AttachCompositorAnimationTimeline(CompositorAnimationTimeline*); 595 void AttachCompositorAnimationTimeline(CompositorAnimationTimeline*);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 719
720 // This is owned by the LayerTreeHostImpl, and should only be used on the 720 // This is owned by the LayerTreeHostImpl, and should only be used on the
721 // compositor thread. The LayerTreeHostImpl is indirectly owned by this 721 // compositor thread. The LayerTreeHostImpl is indirectly owned by this
722 // class so this pointer should be valid until this class is destructed. 722 // class so this pointer should be valid until this class is destructed.
723 CrossThreadPersistent<CompositorMutatorImpl> mutator_; 723 CrossThreadPersistent<CompositorMutatorImpl> mutator_;
724 724
725 Persistent<EventListener> popup_mouse_wheel_event_listener_; 725 Persistent<EventListener> popup_mouse_wheel_event_listener_;
726 726
727 // The local root whose document has |popup_mouse_wheel_event_listener_| 727 // The local root whose document has |popup_mouse_wheel_event_listener_|
728 // registered. 728 // registered.
729 WeakPersistent<WebLocalFrameImpl> local_root_with_empty_mouse_wheel_listener_; 729 WeakPersistent<WebLocalFrameBase> local_root_with_empty_mouse_wheel_listener_;
730 730
731 WebPageImportanceSignals page_importance_signals_; 731 WebPageImportanceSignals page_importance_signals_;
732 732
733 const std::unique_ptr<WebViewScheduler> scheduler_; 733 const std::unique_ptr<WebViewScheduler> scheduler_;
734 734
735 double last_frame_time_monotonic_; 735 double last_frame_time_monotonic_;
736 736
737 // TODO(lfg): This is used in order to disable compositor visibility while 737 // TODO(lfg): This is used in order to disable compositor visibility while
738 // the page is still visible. This is needed until the WebView and WebWidget 738 // the page is still visible. This is needed until the WebView and WebWidget
739 // split is complete, since in out-of-process iframes the page can be 739 // split is complete, since in out-of-process iframes the page can be
740 // visible, but the WebView should not be used as a widget. 740 // visible, but the WebView should not be used as a widget.
741 bool override_compositor_visibility_; 741 bool override_compositor_visibility_;
742 742
743 Persistent<ResizeViewportAnchor> resize_viewport_anchor_; 743 Persistent<ResizeViewportAnchor> resize_viewport_anchor_;
744 }; 744 };
745 745
746 // We have no ways to check if the specified WebView is an instance of 746 // We have no ways to check if the specified WebView is an instance of
747 // WebViewImpl because WebViewImpl is the only implementation of WebView. 747 // WebViewImpl because WebViewImpl is the only implementation of WebView.
748 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 748 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
749 749
750 } // namespace blink 750 } // namespace blink
751 751
752 #endif 752 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewFrameWidget.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698