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

Unified Diff: blimp/client/input/blimp_input_handler_wrapper.cc

Issue 1636163002: Restructure contents of blimp/client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « blimp/client/input/blimp_input_handler_wrapper.h ('k') | blimp/client/input/blimp_input_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/input/blimp_input_handler_wrapper.cc
diff --git a/blimp/client/input/blimp_input_handler_wrapper.cc b/blimp/client/input/blimp_input_handler_wrapper.cc
deleted file mode 100644
index 233e739a435cb2281255ee6375e1a3801521a286..0000000000000000000000000000000000000000
--- a/blimp/client/input/blimp_input_handler_wrapper.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/client/input/blimp_input_handler_wrapper.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/logging.h"
-#include "blimp/client/input/blimp_input_manager.h"
-#include "ui/events/gestures/blink/web_gesture_curve_impl.h"
-
-namespace blimp {
-namespace client {
-
-BlimpInputHandlerWrapper::BlimpInputHandlerWrapper(
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- const base::WeakPtr<BlimpInputManager> input_manager_weak_ptr,
- cc::InputHandler* input_handler)
- : main_task_runner_(main_task_runner),
- input_manager_weak_ptr_(input_manager_weak_ptr) {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
- DCHECK(input_handler);
- input_handler_proxy_.reset(
- new ui::InputHandlerProxy(input_handler, this));
-}
-
-BlimpInputHandlerWrapper::~BlimpInputHandlerWrapper() {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-
- // The input handler proxy must have been shutdown by the cc::InputHandler
- // before the InputHandlerWrapper is destroyed.
- DCHECK(!input_handler_proxy_);
-}
-
-void BlimpInputHandlerWrapper::HandleWebInputEvent(
- scoped_ptr<blink::WebInputEvent> input_event) {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-
- // We might not have the input handler proxy anymore.
- if (!input_handler_proxy_)
- return;
-
- ui::InputHandlerProxy::EventDisposition disposition =
- input_handler_proxy_->HandleInputEvent(*input_event);
-
- bool consumed = false;
-
- switch (disposition) {
- case ui::InputHandlerProxy::EventDisposition::DID_HANDLE:
- case ui::InputHandlerProxy::EventDisposition::DROP_EVENT:
- consumed = true;
- break;
- case ui::InputHandlerProxy::EventDisposition::DID_NOT_HANDLE:
- consumed = false;
- break;
- }
-
- main_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&BlimpInputManager::DidHandleWebInputEvent,
- input_manager_weak_ptr_,
- base::Passed(&input_event), consumed));
-}
-
-void BlimpInputHandlerWrapper::WillShutdown() {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-
- input_handler_proxy_.reset();
-}
-
-void BlimpInputHandlerWrapper::TransferActiveWheelFlingAnimation(
- const blink::WebActiveWheelFlingParameters& params) {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-
- NOTIMPLEMENTED() <<
- "Transferring Fling Animations to the engine is not supported";
-}
-
-blink::WebGestureCurve* BlimpInputHandlerWrapper::CreateFlingAnimationCurve(
- blink::WebGestureDevice device_source,
- const blink::WebFloatPoint& velocity,
- const blink::WebSize& cumulative_scroll) {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-
- return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve(
- gfx::Vector2dF(velocity.x, velocity.y),
- gfx::Vector2dF(cumulative_scroll.width,
- cumulative_scroll.height),
- false /* on_main_thread */).release();
-}
-
-void BlimpInputHandlerWrapper::DidOverscroll(
- const gfx::Vector2dF& accumulated_overscroll,
- const gfx::Vector2dF& latest_overscroll_delta,
- const gfx::Vector2dF& current_fling_velocity,
- const gfx::PointF& causal_event_viewport_point) {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-}
-
-void BlimpInputHandlerWrapper::DidStopFlinging() {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-}
-
-void BlimpInputHandlerWrapper::DidAnimateForInput() {
- DCHECK(compositor_thread_checker_.CalledOnValidThread());
-}
-
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/input/blimp_input_handler_wrapper.h ('k') | blimp/client/input/blimp_input_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698