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

Issue 2863913002: Change AudioOutputDeviceClientImpl to use WebLocalFrameBase and move to modules. (Closed)

Created:
3 years, 7 months ago by slangley
Modified:
3 years, 7 months ago
Reviewers:
haraken, sashab, dcheng
CC:
blink-reviews, blink-reviews-frames_chromium.org, chromium-reviews, haraken, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Change AudioOutputDeviceClientImpl to use WebLocalFrameBase and move to modules. AudioOutputDeviceClientImpl is the first class that is using WebLocalFrameBase to break the dependency on WebLocalFrameImpl, and as a result this CL contains a lot off additional once only changes to support this. Changes contained in this cl: - Create a WebInitializer class that is called when WebKit is being initialized for the process. This class can then contain once-per-process initialization code. - Use WebInitialize to register callbacks to create WebLocalFrameImpl from WebLocalFrameBase. Without this callback mechanism we would need to put WebLocalFrameBase::FromFrame implementation intl WebLocalFrameImpl, but this will not link as modules/ cannot depend on web/. The callbacks allow us to keep WebLocalFrameBase independent from WebLocalFrameImpl. - Add a pure virtual Client() method to WebLocalFrameBase that is used by AudioOutputDeviceCientImpl. - Move AudioOutputDeviceClientImpl to modules/audio_output_devices. I suppose it is possible to merge AudioOutputDeviceClientImpl with AudioOutputDeviceClient, but my preference would be to do this in a followup CL. BUG=708879

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fix code review comments. #

Total comments: 10

Patch Set 3 : Use chrome client to create instances of WebLocalFrameBase. #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -87 lines) Patch
M third_party/WebKit/Source/core/frame/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/WebLocalFrameBase.h View 1 2 2 chunks +14 lines, -2 lines 2 comments Download
A third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/ChromeClient.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClientImpl.h View 1 chunk +3 lines, -2 lines 0 comments Download
A + third_party/WebKit/Source/modules/audio_output_devices/AudioOutputDeviceClientImpl.cpp View 1 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/audio_output_devices/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
D third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.h View 1 chunk +0 lines, -40 lines 0 comments Download
D third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp View 1 chunk +0 lines, -34 lines 0 comments Download
M third_party/WebKit/Source/web/BUILD.gn View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 3 chunks +6 lines, -1 line 3 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 32 (16 generated)
slangley
3 years, 7 months ago (2017-05-05 03:50:52 UTC) #3
sashab
lgtm
3 years, 7 months ago (2017-05-05 04:00:17 UTC) #6
sashab
Only thing I'm not sure about is the callback syntax, haven't seen that much in ...
3 years, 7 months ago (2017-05-05 04:05:41 UTC) #7
slangley
haraken@ - ptal WDYT of the function pointer style? Also, WDYT in general? ;) Thanks
3 years, 7 months ago (2017-05-05 04:07:30 UTC) #9
dcheng
https://codereview.chromium.org/2863913002/diff/1/third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp File third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp (right): https://codereview.chromium.org/2863913002/diff/1/third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp#newcode21 third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp:21: return create_local_frame_ref_callback_(frame); Maybe this can just use the pointer ...
3 years, 7 months ago (2017-05-05 04:54:52 UTC) #11
slangley
dcheng@ - ptal https://codereview.chromium.org/2863913002/diff/1/third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp File third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp (right): https://codereview.chromium.org/2863913002/diff/1/third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp#newcode21 third_party/WebKit/Source/core/frame/WebLocalFrameBase.cpp:21: return create_local_frame_ref_callback_(frame); On 2017/05/05 at 04:54:52, ...
3 years, 7 months ago (2017-05-05 06:25:01 UTC) #14
dcheng
https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode33 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:33: // so that WebLocalFrameBase can instantiate the concrete class. ...
3 years, 7 months ago (2017-05-05 06:29:58 UTC) #17
slangley
https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode33 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:33: // so that WebLocalFrameBase can instantiate the concrete class. ...
3 years, 7 months ago (2017-05-05 09:25:08 UTC) #20
haraken
https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode33 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:33: // so that WebLocalFrameBase can instantiate the concrete class. ...
3 years, 7 months ago (2017-05-05 13:48:51 UTC) #21
slangley
haraken@ - your thoughts? https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode33 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:33: // so that WebLocalFrameBase can ...
3 years, 7 months ago (2017-05-07 00:12:10 UTC) #22
haraken
https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode33 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:33: // so that WebLocalFrameBase can instantiate the concrete class. ...
3 years, 7 months ago (2017-05-08 00:01:58 UTC) #23
slangley
PTAL https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/20001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode33 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:33: // so that WebLocalFrameBase can instantiate the concrete ...
3 years, 7 months ago (2017-05-08 01:47:50 UTC) #24
haraken
LGTM https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode27 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:27: CORE_EXPORT static WebLocalFrameBase* FromFrame(LocalFrame*); FromFrame => Create ? ...
3 years, 7 months ago (2017-05-08 04:25:24 UTC) #29
dcheng
https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Source/web/ChromeClientImpl.cpp File third_party/WebKit/Source/web/ChromeClientImpl.cpp (right): https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Source/web/ChromeClientImpl.cpp#newcode1250 third_party/WebKit/Source/web/ChromeClientImpl.cpp:1250: WebLocalFrameBase* ChromeClientImpl::CreateWebLocalFrameBase( On 2017/05/08 04:25:24, haraken wrote: > > ...
3 years, 7 months ago (2017-05-08 04:29:44 UTC) #30
haraken
https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right): https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Source/core/frame/WebLocalFrameBase.h#newcode26 third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:26: // Creation Methods. Reword this. As dcheng@ said, this ...
3 years, 7 months ago (2017-05-08 04:33:54 UTC) #31
slangley
3 years, 7 months ago (2017-05-08 05:00:17 UTC) #32
On 2017/05/08 at 04:33:54, haraken wrote:
>
https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/frame/WebLocalFrameBase.h (right):
> 
>
https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/frame/WebLocalFrameBase.h:26: // Creation
Methods.
> 
> Reword this. As dcheng@ said, this is not creating any object.
> 
>
https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/web/ChromeClientImpl.cpp (right):
> 
>
https://codereview.chromium.org/2863913002/diff/40001/third_party/WebKit/Sour...
> third_party/WebKit/Source/web/ChromeClientImpl.cpp:1250: WebLocalFrameBase*
ChromeClientImpl::CreateWebLocalFrameBase(
> On 2017/05/08 04:29:44, dcheng wrote:
> > On 2017/05/08 04:25:24, haraken wrote:
> > > 
> > > Maybe should we call this CreateWebLocalFrameImpl?
> > 
> > This isn't actually creating any objects though, is it?
> 
> Ah, right. FromFrame() sounds nice.

Turns out there is a linker problem, as we need to access WebFrameClient() from
AudioOutputDeviceClientImpl which in turn needs WebFrame which needs a bunch of
stuff. I will create a new CL with for the parts of WebLocalFrameBase::FromFrame
with a simpler use case and then come back to this CL later.

Powered by Google App Engine
This is Rietveld 408576698