Commit 3581c0a9 authored by Ryan Daum's avatar Ryan Daum Committed by Commit Bot

Pull cast system gesture methods up to base window manager interface.

Background: Implementation of the side swipe system gesture handling
is present only in the CastWindowManagerAura implementation, but
actual users will only have a handle to the base CastWindowManager
interface. This CL pulls the methods up to the interface and leaves
them as stubs in the CastWindowManagerDefault.

Bug: b/71541742
Tested: Manual testing
Change-Id: Ib83e42b046153a0e680f8d76eda6d9c0e7bb655d
Reviewed-on: https://chromium-review.googlesource.com/891478Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Ryan Daum <rdaum@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532575}
parent 5617cbef
......@@ -16,6 +16,8 @@ class Event;
namespace chromecast {
class CastSideSwipeGestureHandlerInterface;
// Chromecast's window-manager interface.
// This declares the interface to add top-level windows to the Chromecast
// platform window. It is owned by the UI thread, and generally one instance
......@@ -57,6 +59,14 @@ class CastWindowManager {
// Inject a UI event into the Cast window.
virtual void InjectEvent(ui::Event* event) = 0;
// Register a new handler for a system side swipe event.
virtual void AddSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler) = 0;
// Remove the registration of a system side swipe event handler.
virtual void RemoveSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler) = 0;
};
} // namespace chromecast
......
......@@ -21,7 +21,6 @@ class ScreenPositionClient;
namespace chromecast {
class CastFocusClientAura;
class CastSideSwipeGestureHandlerInterface;
class CastSystemGestureEventHandler;
class CastWindowTreeHost;
......@@ -41,13 +40,11 @@ class CastWindowManagerAura : public CastWindowManager,
aura::Window* GetDefaultParent(aura::Window* window,
const gfx::Rect& bounds) override;
// Register a new handler for a system side swipe event.
void AddSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler);
CastSideSwipeGestureHandlerInterface* handler) override;
// Remove the registration of a system side swipe event handler.
void RemoveSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler);
CastSideSwipeGestureHandlerInterface* handler) override;
private:
friend class CastWindowManager;
......
......@@ -27,4 +27,12 @@ gfx::NativeView CastWindowManagerDefault::GetRootWindow() {
return nullptr;
}
void CastWindowManagerDefault::AddSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler) {}
// Remove the registration of a system side swipe event handler.
void CastWindowManagerDefault::CastWindowManagerDefault::
RemoveSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler) {}
} // namespace chromecast
......@@ -23,6 +23,12 @@ class CastWindowManagerDefault : public CastWindowManager {
gfx::NativeView GetRootWindow() override;
void InjectEvent(ui::Event* event) override;
void AddSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler) override;
void RemoveSideSwipeGestureHandler(
CastSideSwipeGestureHandlerInterface* handler) override;
private:
friend class CastWindowManager;
......
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