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

Unified Diff: blimp/client/core/compositor/blimp_compositor.cc

Issue 2400923002: Move BlimpInputManager to BlimpDocument from BlimpCompositor. (Closed)
Patch Set: Removed unnecessary DCHECK. Created 4 years, 2 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
Index: blimp/client/core/compositor/blimp_compositor.cc
diff --git a/blimp/client/core/compositor/blimp_compositor.cc b/blimp/client/core/compositor/blimp_compositor.cc
index 0ac6944f9b496aba9a4aa3cdb8091343b7eb03ce..3bff4ff0f7cf6d8135c3d89012f2fc4b56fae496 100644
--- a/blimp/client/core/compositor/blimp_compositor.cc
+++ b/blimp/client/core/compositor/blimp_compositor.cc
@@ -93,12 +93,6 @@ void BlimpCompositor::SetVisible(bool visible) {
CheckPendingCommitCounts(true /* flush */);
}
-bool BlimpCompositor::OnTouchEvent(const ui::MotionEvent& motion_event) {
- if (input_manager_)
- return input_manager_->OnTouchEvent(motion_event);
- return false;
-}
-
void BlimpCompositor::NotifyWhenDonePendingCommits(base::Closure callback) {
if (outstanding_commits_ == 0) {
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
@@ -168,6 +162,11 @@ void BlimpCompositor::OnCompositorMessageReceived(
}
}
+// Returns a reference to the InputHandler owned by layer tree host.
+const base::WeakPtr<cc::InputHandler>& BlimpCompositor::GetInputHandler() {
+ return host_->GetInputHandler();
+}
+
void BlimpCompositor::OnContextProvidersCreated(
const scoped_refptr<cc::ContextProvider>& compositor_context_provider,
const scoped_refptr<cc::ContextProvider>& worker_context_provider) {
@@ -196,11 +195,6 @@ void BlimpCompositor::OnContextProvidersCreated(
host_->SetCompositorFrameSink(std::move(compositor_frame_sink));
}
-void BlimpCompositor::SendWebGestureEvent(
- const blink::WebGestureEvent& gesture_event) {
- client_->SendWebGestureEvent(gesture_event);
-}
-
void BlimpCompositor::BindToProxyClient(
base::WeakPtr<BlimpCompositorFrameSinkProxyClient> proxy_client) {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -309,11 +303,6 @@ void BlimpCompositor::CreateLayerTreeHost() {
host_ = cc::LayerTreeHostInProcess::CreateRemoteClient(
this /* remote_proto_channel */, compositor_task_runner, &params);
-
- DCHECK(!input_manager_);
- input_manager_ = BlimpInputManager::Create(
- this, base::ThreadTaskRunnerHandle::Get(), compositor_task_runner,
- host_->GetInputHandler());
}
void BlimpCompositor::DestroyLayerTreeHost() {
@@ -328,12 +317,6 @@ void BlimpCompositor::DestroyLayerTreeHost() {
// Destroy the old LayerTreeHost state.
host_.reset();
- // Destroy the old input manager state.
- // It is important to destroy the LayerTreeHost before destroying the input
- // manager as it has a reference to the cc::InputHandlerClient owned by the
- // BlimpInputManager.
- input_manager_.reset();
-
// Cancel any outstanding CompositorFrameSink requests. That way if we get an
// async callback related to the old request we know to drop it.
compositor_frame_sink_request_pending_ = false;
« no previous file with comments | « blimp/client/core/compositor/blimp_compositor.h ('k') | blimp/client/core/compositor/blimp_compositor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698