Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / ash / shelf / shelf_button_host.h
blobb664c7f407777d18f7cad77671fb379c76f0b8ee
1 // Copyright 2013 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 ASH_SHELF_SHELF_BUTTON_HOST_H_
6 #define ASH_SHELF_SHELF_BUTTON_HOST_H_
8 #include "ash/ash_export.h"
9 #include "base/strings/string16.h"
11 namespace ui {
12 class LocatedEvent;
15 namespace views {
16 class View;
19 namespace ash {
21 // The shelf buttons communicate back to the host by way of this interface.
22 // This interface is used to enable reordering the items on the shelf.
23 class ASH_EXPORT ShelfButtonHost {
24 public:
25 enum Pointer {
26 NONE,
27 DRAG_AND_DROP,
28 MOUSE,
29 TOUCH,
32 // Invoked when a pointer device is pressed on a view.
33 virtual void PointerPressedOnButton(views::View* view,
34 Pointer pointer,
35 const ui::LocatedEvent& event) = 0;
37 // Invoked when a pointer device is dragged over a view.
38 virtual void PointerDraggedOnButton(views::View* view,
39 Pointer pointer,
40 const ui::LocatedEvent& event) = 0;
42 // Invoked either if a pointer device is released or mouse capture canceled.
43 virtual void PointerReleasedOnButton(views::View* view,
44 Pointer pointer,
45 bool canceled) = 0;
47 // Invoked when the mouse moves on the item.
48 virtual void MouseMovedOverButton(views::View* view) = 0;
50 // Invoked when the mouse enters the item.
51 virtual void MouseEnteredButton(views::View* view) = 0;
53 // Invoked when the mouse exits the item.
54 virtual void MouseExitedButton(views::View* view) = 0;
56 // Invoked to get the accessible name of the item.
57 virtual base::string16 GetAccessibleName(const views::View* view) = 0;
59 protected:
60 virtual ~ShelfButtonHost() {}
63 } // namespace ash
65 #endif // ASH_SHELF_SHELF_BUTTON_HOST_H_