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"
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
{
32 // Invoked when a pointer device is pressed on a view.
33 virtual void PointerPressedOnButton(views::View
* view
,
35 const ui::LocatedEvent
& event
) = 0;
37 // Invoked when a pointer device is dragged over a view.
38 virtual void PointerDraggedOnButton(views::View
* view
,
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
,
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;
60 virtual ~ShelfButtonHost() {}
65 #endif // ASH_SHELF_SHELF_BUTTON_HOST_H_