Skip to content

Commit

Permalink
Move more classes to use WebLocalFrameBase from WebLocalFrameImpl.
Browse files Browse the repository at this point in the history
These use cases do not require any further virtual methods to be declared in
WebLocalFrameBase - they simply call the existing Client() method.

This CL updates:
- AudioOutputDeviceClientImpl.cpp
- MediaKeysClientImpl.cpp
- WebPluginContainerImpl.cpp

BUG=708879

Review-Url: https://codereview.chromium.org/2871833003
Cr-Commit-Position: refs/heads/master@{#470279}
  • Loading branch information
slangley authored and Commit bot committed May 9, 2017
1 parent cf94195 commit 88ffa87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions third_party/WebKit/Source/web/AudioOutputDeviceClientImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

#include "web/AudioOutputDeviceClientImpl.h"

#include <memory>
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
#include "core/frame/WebLocalFrameBase.h"
#include "public/web/WebFrameClient.h"
#include "web/WebLocalFrameImpl.h"
#include <memory>

namespace blink {

Expand All @@ -24,8 +24,8 @@ void AudioOutputDeviceClientImpl::CheckIfAudioSinkExistsAndIsAuthorized(
DCHECK(context);
DCHECK(context->IsDocument());
Document* document = ToDocument(context);
WebLocalFrameImpl* web_frame =
WebLocalFrameImpl::FromFrame(document->GetFrame());
WebLocalFrameBase* web_frame =
WebLocalFrameBase::FromFrame(document->GetFrame());
web_frame->Client()->CheckIfAudioSinkExistsAndIsAuthorized(
sink_id, WebSecurityOrigin(context->GetSecurityOrigin()),
callbacks.release());
Expand Down
6 changes: 3 additions & 3 deletions third_party/WebKit/Source/web/MediaKeysClientImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
#include "core/frame/WebLocalFrameBase.h"
#include "public/platform/WebContentDecryptionModule.h"
#include "public/web/WebFrameClient.h"
#include "web/WebLocalFrameImpl.h"

namespace blink {

Expand All @@ -17,8 +17,8 @@ MediaKeysClientImpl::MediaKeysClientImpl() {}
WebEncryptedMediaClient* MediaKeysClientImpl::EncryptedMediaClient(
ExecutionContext* execution_context) {
Document* document = ToDocument(execution_context);
WebLocalFrameImpl* web_frame =
WebLocalFrameImpl::FromFrame(document->GetFrame());
WebLocalFrameBase* web_frame =
WebLocalFrameBase::FromFrame(document->GetFrame());
return web_frame->Client()->EncryptedMediaClient();
}

Expand Down
6 changes: 3 additions & 3 deletions third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "core/frame/EventHandlerRegistry.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/WebLocalFrameBase.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLPlugInElement.h"
Expand Down Expand Up @@ -105,7 +106,6 @@
#include "public/web/WebViewClient.h"
#include "web/ChromeClientImpl.h"
#include "web/WebInputEventConversion.h"
#include "web/WebLocalFrameImpl.h"

namespace blink {

Expand Down Expand Up @@ -814,8 +814,8 @@ void WebPluginContainerImpl::HandleKeyboardEvent(KeyboardEvent* event) {
}

// Give the client a chance to issue edit comamnds.
WebLocalFrameImpl* web_frame =
WebLocalFrameImpl::FromFrame(element_->GetDocument().GetFrame());
WebLocalFrameBase* web_frame =
WebLocalFrameBase::FromFrame(element_->GetDocument().GetFrame());
if (web_plugin_->SupportsEditCommands())
web_frame->Client()->HandleCurrentKeyboardEvent();

Expand Down

0 comments on commit 88ffa87

Please sign in to comment.