summaryrefslogtreecommitdiffstats
path: root/ash/launcher/launcher_button_host.h
blob: 1cc94614a423ca9596d02b80390247e612d7a082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2012 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_LAUNCHER_LAUNCHER_BUTTON_HOST_H_
#define ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_
#pragma once

namespace views {
class MouseEvent;
class View;
}

namespace ash {
namespace internal {

// The launcher buttons communicate back to the host by way of this interface.
// This interface is used to enable reordering the items on the launcher.
class LauncherButtonHost {
 public:
  // Invoked when the mose is pressed on a view.
  virtual void MousePressedOnButton(views::View* view,
                                    const views::MouseEvent& event) = 0;

  // Invoked when the mouse is dragged over a view.
  virtual void MouseDraggedOnButton(views::View* view,
                                    const views::MouseEvent& event) = 0;

  // Invoked either if the mouse is released or mouse capture canceled.
  virtual void MouseReleasedOnButton(views::View* view,
                                     bool canceled) = 0;

  // Invoked when the mouse exits the item.
  virtual void MouseExitedButton(views::View* view) = 0;

 protected:
  virtual ~LauncherButtonHost() {}
};

}  // namespace internal
}  // namespace ash

#endif  // ASH_LAUNCHER_LAUNCHER_BUTTON_HOST_H_