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

Unified Diff: blimp/client/core/input/blimp_input_manager.cc

Issue 2292723003: Move remaining Blimp feature code to core. (Closed)
Patch Set: Fix build break Created 4 years, 4 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/core/input/blimp_input_manager.h ('k') | blimp/client/core/render_widget/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/input/blimp_input_manager.cc
diff --git a/blimp/client/feature/compositor/blimp_input_manager.cc b/blimp/client/core/input/blimp_input_manager.cc
similarity index 86%
rename from blimp/client/feature/compositor/blimp_input_manager.cc
rename to blimp/client/core/input/blimp_input_manager.cc
index f1d106f2d07defae6347eb75debb7119977dcf94..87f77e1da53116dbe1c3d3ad6e5789c6a3a8d681 100644
--- a/blimp/client/feature/compositor/blimp_input_manager.cc
+++ b/blimp/client/core/input/blimp_input_manager.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/client/feature/compositor/blimp_input_manager.h"
+#include "blimp/client/core/input/blimp_input_manager.h"
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
+#include "blimp/client/core/input/blimp_input_handler_wrapper.h"
#include "ui/events/blink/blink_event_util.h"
#include "ui/events/gesture_detection/gesture_provider_config_helper.h"
@@ -30,7 +31,8 @@ BlimpInputManager::BlimpInputManager(
const base::WeakPtr<cc::InputHandler>& input_handler)
: client_(client),
gesture_provider_(ui::GetGestureProviderConfig(
- ui::GestureProviderConfigType::CURRENT_PLATFORM), this),
+ ui::GestureProviderConfigType::CURRENT_PLATFORM),
+ this),
main_task_runner_(main_task_runner),
compositor_task_runner_(compositor_task_runner),
main_thread_blocked_(false),
@@ -40,8 +42,7 @@ BlimpInputManager::BlimpInputManager(
FROM_HERE,
base::Bind(
&BlimpInputManager::CreateInputHandlerWrapperOnCompositorThread,
- base::Unretained(this), weak_factory_.GetWeakPtr(),
- input_handler));
+ base::Unretained(this), weak_factory_.GetWeakPtr(), input_handler));
}
BlimpInputManager::~BlimpInputManager() {
@@ -51,13 +52,11 @@ BlimpInputManager::~BlimpInputManager() {
base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
{
- base::AutoReset<bool> auto_reset_main_thread_blocked(
- &main_thread_blocked_, true);
+ base::AutoReset<bool> auto_reset_main_thread_blocked(&main_thread_blocked_,
+ true);
compositor_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(
- &BlimpInputManager::ShutdownOnCompositorThread,
- base::Unretained(this), &shutdown_event));
+ FROM_HERE, base::Bind(&BlimpInputManager::ShutdownOnCompositorThread,
+ base::Unretained(this), &shutdown_event));
shutdown_event.Wait();
}
}
@@ -70,9 +69,8 @@ bool BlimpInputManager::OnTouchEvent(const ui::MotionEvent& motion_event) {
if (!result.succeeded)
return false;
- blink::WebTouchEvent touch =
- ui::CreateWebTouchEventFromMotionEvent(motion_event,
- result.moved_beyond_slop_region);
+ blink::WebTouchEvent touch = ui::CreateWebTouchEventFromMotionEvent(
+ motion_event, result.moved_beyond_slop_region);
// Touch events are queued in the Gesture Provider until acknowledged to
// allow them to be consumed by the touch event handlers in blink which can
« no previous file with comments | « blimp/client/core/input/blimp_input_manager.h ('k') | blimp/client/core/render_widget/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698