Commit 8985ccdc authored by Albert Chaulk's avatar Albert Chaulk Committed by Commit Bot

Add CastContentWindow::SetCanGoBackQuery

This allows querying the CanGoBack status of the underlying app

Bug: b/145762033
Test: None
Change-Id: I330d7124dd7817db69f5ff41bfa58f6059971113
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2008066Reviewed-by: default avatarLuke Halliwell (slow) <halliwell@chromium.org>
Commit-Queue: Albert Chaulk <achaulk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733446}
parent c1149098
......@@ -24,6 +24,9 @@ void CastContentWindow::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
}
void CastContentWindow::SetCanGoBackQuery(
base::RepeatingCallback<bool()> can_go_back) {}
mojom::MediaControlUi* CastContentWindow::media_controls() {
return nullptr;
}
......
......@@ -8,6 +8,7 @@
#include <memory>
#include <string>
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
......@@ -204,6 +205,10 @@ class CastContentWindow {
// the window manager.
virtual void SetHostContext(base::Value host_context) = 0;
// Set a callback that can be queried for if the owner can handle a "back"
// gesture. If not set the default is to assume that gestures are unhandled.
virtual void SetCanGoBackQuery(base::RepeatingCallback<bool()> can_go_back);
// Notify the window that its visibility type has changed. This should only
// ever be called by the window manager.
// TODO(seantopping): Make this private to the window manager.
......
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