-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This CL replaces the cast-specific CastContentWindow type with a generic platform-specific type, with an implementation on top of CastContentWindow. Bug: 1357135, 1359588 Change-Id: I42a06fd9689d99978de0d154e9c08f88fa5397e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3993678 Reviewed-by: Vigen Issahhanjan <vigeni@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com> Cr-Commit-Position: refs/heads/main@{#1067669}
- Loading branch information
Ryan Keane
authored and
Chromium LUCI CQ
committed
Nov 4, 2022
1 parent
aa47783
commit 6802fd2
Showing
7 changed files
with
240 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
components/cast_receiver/browser/content_window_controls.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright 2022 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "components/cast_receiver/browser/public/content_window_controls.h" | ||
|
||
namespace cast_receiver { | ||
|
||
ContentWindowControls::VisibilityChangeObserver::~VisibilityChangeObserver() = | ||
default; | ||
|
||
ContentWindowControls::ContentWindowControls() = default; | ||
|
||
ContentWindowControls::~ContentWindowControls() = default; | ||
|
||
void ContentWindowControls::AddVisibilityChangeObserver( | ||
VisibilityChangeObserver& observer) { | ||
visibility_state_observer_list_.AddObserver(&observer); | ||
} | ||
|
||
void ContentWindowControls::RemoveVisibilityChangeObserver( | ||
VisibilityChangeObserver& observer) { | ||
visibility_state_observer_list_.RemoveObserver(&observer); | ||
} | ||
|
||
void ContentWindowControls::OnWindowShown() { | ||
for (auto& observer : visibility_state_observer_list_) { | ||
observer.OnWindowShown(); | ||
} | ||
} | ||
|
||
void ContentWindowControls::OnWindowHidden() { | ||
for (auto& observer : visibility_state_observer_list_) { | ||
observer.OnWindowHidden(); | ||
} | ||
} | ||
|
||
} // namespace cast_receiver |
Oops, something went wrong.