exo: Simplifies WaylandKeyboardDelegate lifetime management.
It is just the delegate of Keyboard, so instead of using
the observer, this CL just defers the lifetime management
of WaylandKeyboardDelegate to Keyboard.
This allows us to remove the inheritance of KeyboardObserver
from WaylandKeyboardDelegate.
BUG=1123705
TEST=Ran exo_unittests.
Change-Id: I45b35a016edc3c7bd441223f1b25a28ad1debaa3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416476
Commit-Queue: Hidehiko Abe <[email protected]>
Reviewed-by: Jun Mukai <[email protected]>
Cr-Commit-Position: refs/heads/master@{#808192}
diff --git a/components/exo/keyboard_delegate.h b/components/exo/keyboard_delegate.h
index 90484cb..6e9bb031 100644
--- a/components/exo/keyboard_delegate.h
+++ b/components/exo/keyboard_delegate.h
@@ -19,6 +19,8 @@
// Handles events on keyboards in context-specific ways.
class KeyboardDelegate {
public:
+ virtual ~KeyboardDelegate() = default;
+
// This should return true if |surface| is a valid target for this keyboard.
// E.g. the surface is owned by the same client as the keyboard.
virtual bool CanAcceptKeyboardEventsForSurface(Surface* surface) const = 0;
@@ -46,9 +48,6 @@
virtual void OnKeyRepeatSettingsChanged(bool enabled,
base::TimeDelta delay,
base::TimeDelta interval) = 0;
-
- protected:
- virtual ~KeyboardDelegate() {}
};
} // namespace exo