Commit cd44ab38 authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

media/capture: Remove constant argument in WebContentsTracker.

In the constructor:
~~~
  explicit WebContentsTracker(bool track_fullscreen_rwhv);
~~~
|track_fullscreen_rwhv| is always false. So it must be removed, with its
implementation.

Bug: None.
Change-Id: Icccac2143d6150cd00d040853cb2c610aba4aa0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841340Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703652}
parent 468cff75
...@@ -385,7 +385,7 @@ WebContentsAudioInputStream* WebContentsAudioInputStream::Create( ...@@ -385,7 +385,7 @@ WebContentsAudioInputStream* WebContentsAudioInputStream::Create(
return new WebContentsAudioInputStream( return new WebContentsAudioInputStream(
media_id.render_process_id, media_id.main_render_frame_id, media_id.render_process_id, media_id.main_render_frame_id,
audio_mirroring_manager, new WebContentsTracker(false), audio_mirroring_manager, new WebContentsTracker(),
new media::VirtualAudioInputStream( new media::VirtualAudioInputStream(
params, worker_task_runner, params, worker_task_runner,
media::VirtualAudioInputStream::AfterCloseCallback()), media::VirtualAudioInputStream::AfterCloseCallback()),
......
...@@ -77,8 +77,7 @@ class MockAudioMirroringManager : public AudioMirroringManager { ...@@ -77,8 +77,7 @@ class MockAudioMirroringManager : public AudioMirroringManager {
class MockWebContentsTracker : public WebContentsTracker { class MockWebContentsTracker : public WebContentsTracker {
public: public:
MockWebContentsTracker() : WebContentsTracker(false) {} MockWebContentsTracker() = default;
MOCK_METHOD3(Start, MOCK_METHOD3(Start,
void(int render_process_id, int render_frame_id, void(int render_process_id, int render_frame_id,
const ChangeCallback& callback)); const ChangeCallback& callback));
......
...@@ -15,9 +15,7 @@ ...@@ -15,9 +15,7 @@
namespace content { namespace content {
WebContentsTracker::WebContentsTracker(bool track_fullscreen_rwhv) WebContentsTracker::WebContentsTracker() : last_target_view_(nullptr) {}
: track_fullscreen_rwhv_(track_fullscreen_rwhv),
last_target_view_(nullptr) {}
WebContentsTracker::~WebContentsTracker() { WebContentsTracker::~WebContentsTracker() {
// Likely unintentional BUG if Stop() was not called before this point. // Likely unintentional BUG if Stop() was not called before this point.
...@@ -64,11 +62,6 @@ RenderWidgetHostView* WebContentsTracker::GetTargetView() const { ...@@ -64,11 +62,6 @@ RenderWidgetHostView* WebContentsTracker::GetTargetView() const {
if (!wc) if (!wc)
return nullptr; return nullptr;
if (track_fullscreen_rwhv_) {
if (auto* view = wc->GetFullscreenRenderWidgetHostView())
return view;
}
if (auto* view = wc->GetRenderWidgetHostView()) { if (auto* view = wc->GetRenderWidgetHostView()) {
// Make sure the RWHV is still associated with a RWH before considering the // Make sure the RWHV is still associated with a RWH before considering the
// view "alive." This is because a null RWH indicates the RWHV has had its // view "alive." This is because a null RWH indicates the RWHV has had its
......
...@@ -33,11 +33,7 @@ class CONTENT_EXPORT WebContentsTracker ...@@ -33,11 +33,7 @@ class CONTENT_EXPORT WebContentsTracker
: public base::RefCountedThreadSafe<WebContentsTracker>, : public base::RefCountedThreadSafe<WebContentsTracker>,
public WebContentsObserver { public WebContentsObserver {
public: public:
// If |track_fullscreen_rwhv| is true, the ChangeCallback will be run when a WebContentsTracker();
// WebContents shows/destroys a fullscreen RenderWidgetHostView. If false,
// fullscreen events are ignored. Normally, specify true for video capture and
// false for audio capture.
explicit WebContentsTracker(bool track_fullscreen_rwhv);
// Callback to indicate a new RenderWidgetHostView should be targeted for // Callback to indicate a new RenderWidgetHostView should be targeted for
// capture. This is also invoked with false to indicate tracking will not // capture. This is also invoked with false to indicate tracking will not
...@@ -116,10 +112,6 @@ class CONTENT_EXPORT WebContentsTracker ...@@ -116,10 +112,6 @@ class CONTENT_EXPORT WebContentsTracker
void DidShowFullscreenWidget() final; void DidShowFullscreenWidget() final;
void DidDestroyFullscreenWidget() final; void DidDestroyFullscreenWidget() final;
// If true, the client is interested in the showing/destruction of fullscreen
// RenderWidgetHostViews.
const bool track_fullscreen_rwhv_;
// Pointer to the RenderWidgetHostView provided in the last run of // Pointer to the RenderWidgetHostView provided in the last run of
// |callback_|. This is used to eliminate duplicate callback runs. // |callback_|. This is used to eliminate duplicate callback runs.
RenderWidgetHostView* last_target_view_; RenderWidgetHostView* last_target_view_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment