Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: components/mus/public/cpp/window_tree_client.h

Issue 2089183003: mus: Introduce API for embedder to dispatch event to the embeded client. Base URL: https://chromium.googlesource.com/chromium/src.git@mus-parent-window-receives-child-event
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/public/cpp/window.h ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/public/cpp/window_tree_client.h
diff --git a/components/mus/public/cpp/window_tree_client.h b/components/mus/public/cpp/window_tree_client.h
index 24ef564f3f580368956a21ac3c6bca19b0b36671..ab9073a07238e8b47be4921274d52d1154904ea4 100644
--- a/components/mus/public/cpp/window_tree_client.h
+++ b/components/mus/public/cpp/window_tree_client.h
@@ -59,6 +59,7 @@ enum class ChangeType;
// WindowTreeClientDelegate::OnWindowTreeClientDestroyed().
class WindowTreeClient : public mojom::WindowTreeClient,
public mojom::WindowManager,
+ public mojom::InputEventHandler,
public WindowManagerClient {
public:
WindowTreeClient(WindowTreeClientDelegate* delegate,
@@ -300,6 +301,8 @@ class WindowTreeClient : public mojom::WindowTreeClient,
void OnWindowPredefinedCursorChanged(Id window_id,
mojom::Cursor cursor) override;
void OnChangeCompleted(uint32_t change_id, bool success) override;
+ void RequestInputEventHandler(
+ mojom::InputEventHandlerRequest request) override;
void RequestClose(uint32_t window_id) override;
void GetWindowManager(
mojo::AssociatedInterfaceRequest<WindowManager> internal) override;
@@ -341,6 +344,11 @@ class WindowTreeClient : public mojom::WindowTreeClient,
const gfx::Vector2d& offset,
const gfx::Insets& hit_area) override;
+ // mojom::InputEventHandler:
+ void OnInputEvent(uint32_t window_id,
+ std::unique_ptr<ui::Event> event,
+ const OnInputEventCallback& callback) override;
+
// The one int in |cursor_location_mapping_|. When we read from this
// location, we must always read from it atomically.
base::subtle::Atomic32* cursor_location_memory() {
@@ -391,6 +399,7 @@ class WindowTreeClient : public mojom::WindowTreeClient,
std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManager>>
window_manager_internal_;
mojom::WindowManagerClientAssociatedPtr window_manager_internal_client_;
+ mojo::Binding<mus::mojom::InputEventHandler> event_handler_binding_;
bool has_event_observer_ = false;
« no previous file with comments | « components/mus/public/cpp/window.h ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698