Sort unlaunched apps on app list start page by apps grid order.
[chromium-blink-merge.git] / ui / views / widget / root_view_targeter.h
blob3f1e2c188e45487a55682c11b5f519d27c93df1d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_WIDGET_ROOT_VIEW_TARGETER_H_
6 #define UI_VIEWS_WIDGET_ROOT_VIEW_TARGETER_H_
8 #include "ui/views/view_targeter.h"
9 #include "ui/views/views_export.h"
11 namespace views {
13 namespace internal {
14 class RootView;
15 } // namespace internal
17 class View;
18 class ViewTargeterDelegate;
20 // A derived class of ViewTargeter that defines targeting logic for cases
21 // needing to access the members of RootView. For example, when determining the
22 // target of a gesture event, we need to know if a previous gesture has already
23 // established the View to which all subsequent gestures should be targeted.
24 class VIEWS_EXPORT RootViewTargeter : public ViewTargeter {
25 public:
26 RootViewTargeter(ViewTargeterDelegate* delegate,
27 internal::RootView* root_view);
28 ~RootViewTargeter() override;
30 private:
31 // ViewTargeter:
32 View* FindTargetForGestureEvent(View* root,
33 const ui::GestureEvent& gesture) override;
34 ui::EventTarget* FindNextBestTargetForGestureEvent(
35 ui::EventTarget* previous_target,
36 const ui::GestureEvent& gesture) override;
38 // A pointer to the RootView on which |this| is installed.
39 internal::RootView* root_view_;
41 DISALLOW_COPY_AND_ASSIGN(RootViewTargeter);
44 } // namespace views
46 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_TARGETER_H_