| Index: ash/touch/touch_exploration_controller.h
|
| diff --git a/ash/touch/touch_exploration_controller.h b/ash/touch/touch_exploration_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b171311d7cd0e522ecf7b5147c39d4f03ce8127e
|
| --- /dev/null
|
| +++ b/ash/touch/touch_exploration_controller.h
|
| @@ -0,0 +1,60 @@
|
| +// Copyright 2014 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.
|
| +
|
| +#ifndef ASH_TOUCH_TOUCH_EXPLORATION_CONTROLLER_H_
|
| +#define ASH_TOUCH_TOUCH_EXPLORATION_CONTROLLER_H_
|
| +
|
| +#include "ash/ash_export.h"
|
| +#include "ash/display/display_controller.h"
|
| +#include "base/values.h"
|
| +#include "ui/aura/window.h"
|
| +#include "ui/events/event.h"
|
| +#include "ui/events/event_rewriter.h"
|
| +
|
| +namespace ash {
|
| +
|
| +// TODO: How much screen/display logic (DisplayController::Observer,
|
| +// gfx::DisplayObserver, etc) do we need here? This is managed from
|
| +// RootWindowCOntroller
|
| +// TODO: Maybe implement gfx::DisplayObserver
|
| +// TODO: Do we need to inherit from OutputConfigurator::Observer to react to
|
| +// OnDisplayModeChanged()?
|
| +class ASH_EXPORT TouchExplorationController :
|
| + public ui::EventRewriter,
|
| + public DisplayController::Observer {
|
| + public:
|
| +
|
| + explicit TouchExplorationController(aura::Window* root_window);
|
| + virtual ~TouchExplorationController();
|
| +
|
| + private:
|
| + //Overridden from ui::EventRewriter
|
| + virtual ui::EventRewriteStatus RewriteEvent(
|
| + const ui::Event& event, scoped_ptr<ui::Event>* rewritten_event) OVERRIDE;
|
| + virtual ui::EventRewriteStatus NextDispatchEvent(
|
| + const ui::Event& last_event, scoped_ptr<ui::Event>* new_event) OVERRIDE;
|
| +
|
| + // Overridden form DisplayController::Observer.
|
| + virtual void OnDisplaysInitialized() OVERRIDE;
|
| + virtual void OnDisplayConfigurationChanging() OVERRIDE;
|
| + virtual void OnDisplayConfigurationChanged() OVERRIDE;
|
| +
|
| + ui::Event* CreateMouseMoveEvent(gfx::Point location, int flags);
|
| +
|
| + std::vector<int> touch_ids_;
|
| + // map of touch ids to their last know locations
|
| + std::map<int, gfx::Point> touch_locations_;
|
| +
|
| + // Initialized from RewriteEvent() and dispatched in NextDispatchEvent().
|
| + scoped_ptr<ui::Event> next_dispatch_event_;
|
| +
|
| + const int64 display_id_;
|
| + aura::Window* root_window_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TouchExplorationController);
|
| +};
|
| +
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_TOUCH_TOUCH_EXPLORATION_CONTROLLER_H_
|
|
|