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

Issue 2848513002: Introduce the abstract class WebViewBase, to decouple WebViewImpl. (Closed)

Created:
3 years, 7 months ago by slangley
Modified:
3 years, 7 months ago
Reviewers:
haraken, tkent
CC:
aboxhall, apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, chromium-reviews, dcheng, devtools-reviews_chromium.org, dmazzoni, dougt+watch_chromium.org, gavinp+prerender_chromium.org, je_julie, kinuko+watch, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, mlamouri+watch-blink_chromium.org, nektarios, pfeldman+blink_chromium.org, Yoav Weiss
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce the abstract class WebViewBase, to decouple WebViewImpl. In Source/web/ there are many cyclic dependencies. These cycles make it very difficult to discretely move class implementation from web/ to either core/ or modules/. An example cycle is WebViewImpl and WebLocalFrameImpl. Each refer to the other, rather than the least derived types of WebView and WebLocalFrame (or WebFrame). It is impossible to use the least derived type as methods have been added to the *Impl class definitions that are consumed by other classes in Source/web. To break the cycle we introduce the class WebViewBase, so that the inheritance hierarchy is now WebView <- WebViewBase <- WebViewImpl (<- = implements). Methods that were defined in WebViewImpl are made pure virtual in WebViewBase, and now classes that were taking a dependency on WebViewImpl instead now take a dependency on WebViewBase. This breaks the dependency chain and allows us to start moving these classes out of Source/web into new homes in modules or core. Note: WebViewBase is defined in core/exported/WebViewBase.h as is implements public/web/WebView.h. Once this refactoring is complete WebViewBase will be removed and these changes effectively reverted. This CL moves the first portion of classes to use WebViewBase rather than WebViewImpl, a followup CL will complete this move. BUG=712963 Review-Url: https://codereview.chromium.org/2848513002 Cr-Commit-Position: refs/heads/master@{#467905} Committed: https://chromium.googlesource.com/chromium/src/+/ff3d745c3a244f84d791ea20bd70dd3c9b86a160

Patch Set 1 #

Patch Set 2 : Add comments to WebViewBase. #

Total comments: 2

Patch Set 3 : Fix code review comments & MACOS build failure. #

Patch Set 4 : Define SendContextMenuEvent for MACOS and return kNotHandled, to avoid link errors. #

Patch Set 5 : Fix typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+335 lines, -204 lines) Patch
M third_party/WebKit/Source/core/exported/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/core/exported/WebViewBase.h View 1 2 1 chunk +112 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/ContextMenuClientImpl.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/ContextMenuClientImpl.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/DateTimeChooserImpl.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/DevToolsEmulator.h View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/DevToolsEmulator.cpp View 4 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/EditorClientImpl.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/EditorClientImpl.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ExternalPopupMenu.h View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/ExternalPopupMenu.cpp View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.h View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/FullscreenController.cpp View 11 chunks +37 lines, -36 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorEmulationAgent.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorEmulationAgent.cpp View 7 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorOverlayAgent.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/LinkHighlightImpl.h View 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/LinkHighlightImpl.cpp View 6 chunks +12 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/web/LinkHighlightImplTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 1 2 5 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/PageOverlayTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/PrerendererClientImpl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/SpellCheckerClientImpl.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/StorageClientImpl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/StorageClientImpl.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/TextCheckerClientImpl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/TextFinder.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebAXObject.cpp View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetBase.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetBase.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 4 chunks +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 4 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebStorageEventDispatcherImpl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 12 chunks +49 lines, -46 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/ActiveConnectionThrottlingTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/DeferredLoadingTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/IntersectionObserverTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp View 1 2 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/ResizeObserverTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/TouchActionTest.cpp View 1 2 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/sim/SimTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (19 generated)
slangley
haraken@, tkent@ PTAL This is the alternate method discussed on a previous CL to allow ...
3 years, 7 months ago (2017-04-27 06:40:24 UTC) #5
tkent
lgtm
3 years, 7 months ago (2017-04-27 07:47:53 UTC) #7
haraken
LGTM https://codereview.chromium.org/2848513002/diff/20001/third_party/WebKit/Source/core/exported/WebViewBase.h File third_party/WebKit/Source/core/exported/WebViewBase.h (right): https://codereview.chromium.org/2848513002/diff/20001/third_party/WebKit/Source/core/exported/WebViewBase.h#newcode1 third_party/WebKit/Source/core/exported/WebViewBase.h:1: #ifndef WebViewBase_h Add a copyright.
3 years, 7 months ago (2017-04-27 12:42:04 UTC) #12
slangley
Thanks! https://codereview.chromium.org/2848513002/diff/20001/third_party/WebKit/Source/core/exported/WebViewBase.h File third_party/WebKit/Source/core/exported/WebViewBase.h (right): https://codereview.chromium.org/2848513002/diff/20001/third_party/WebKit/Source/core/exported/WebViewBase.h#newcode1 third_party/WebKit/Source/core/exported/WebViewBase.h:1: #ifndef WebViewBase_h On 2017/04/27 at 12:42:04, haraken wrote: ...
3 years, 7 months ago (2017-04-28 00:16:21 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848513002/40001
3 years, 7 months ago (2017-04-28 01:46:24 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/406672) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 7 months ago (2017-04-28 02:12:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848513002/60001
3 years, 7 months ago (2017-04-28 02:40:15 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/258477)
3 years, 7 months ago (2017-04-28 03:01:42 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848513002/80001
3 years, 7 months ago (2017-04-28 03:34:05 UTC) #26
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 05:40:15 UTC) #29
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/ff3d745c3a244f84d791ea20bd70...

Powered by Google App Engine
This is Rietveld 408576698