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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mus.cc

Issue 2068093002: mus: Allow embedder to intercept events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge 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 | « content/browser/renderer_host/render_widget_host_view_mus.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mus.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_mus.cc b/content/browser/renderer_host/render_widget_host_view_mus.cc
index d2d7b7c1f71e7aab1285b84e8b4de5ff23e78ea1..624c26a70e15be272a55f8dc0d8f95f233fcf906 100644
--- a/content/browser/renderer_host/render_widget_host_view_mus.cc
+++ b/content/browser/renderer_host/render_widget_host_view_mus.cc
@@ -7,8 +7,11 @@
#include <utility>
#include "build/build_config.h"
+#include "components/mus/public/cpp/property_type_converters.h"
#include "components/mus/public/cpp/window.h"
+#include "components/mus/public/cpp/window_property.h"
#include "components/mus/public/cpp/window_tree_client.h"
+#include "components/mus/public/interfaces/window_manager_constants.mojom.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/render_widget_window_tree_client_factory.mojom.h"
@@ -32,6 +35,7 @@ RenderWidgetHostViewMus::RenderWidgetHostViewMus(mus::Window* parent_window,
mus::Window* window = parent_window->window_tree()->NewWindow();
window->SetVisible(true);
window->SetBounds(gfx::Rect(300, 300));
+ window->set_input_event_handler(this);
parent_window->AddChild(window);
mus_window_.reset(new mus::ScopedWindowPtr(window));
host_->SetView(this);
@@ -44,7 +48,8 @@ RenderWidgetHostViewMus::RenderWidgetHostViewMus(mus::Window* parent_window,
mus::mojom::WindowTreeClientPtr window_tree_client;
factory->CreateWindowTreeClientForRenderWidget(
host_->GetRoutingID(), mojo::GetProxy(&window_tree_client));
- mus_window_->window()->Embed(std::move(window_tree_client));
+ mus_window_->window()->Embed(std::move(window_tree_client),
+ mus::mojom::kEmbedFlagEmbedderInterceptsEvents);
}
RenderWidgetHostViewMus::~RenderWidgetHostViewMus() {}
@@ -298,4 +303,12 @@ void RenderWidgetHostViewMus::UnlockCompositingSurface() {
NOTIMPLEMENTED();
}
+void RenderWidgetHostViewMus::OnWindowInputEvent(
+ mus::Window* window,
+ const ui::Event& event,
+ std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
+ ack_callback) {
+ // TODO(sad): Dispatch |event| to the RenderWidgetHost.
+}
+
} // namespace content
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698