2014-10-31 18:17:05 +00:00
|
|
|
// Copyright (c) 2014 GitHub, Inc.
|
2014-06-02 03:08:29 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_
|
2014-06-02 03:08:29 +00:00
|
|
|
|
2015-07-19 04:12:28 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2018-10-25 06:43:50 +00:00
|
|
|
#include "base/observer_list_types.h"
|
|
|
|
|
2015-05-01 09:54:22 +00:00
|
|
|
namespace gfx {
|
2015-05-04 03:43:05 +00:00
|
|
|
class Rect;
|
2017-06-28 19:09:12 +00:00
|
|
|
class Point;
|
2018-04-18 01:44:10 +00:00
|
|
|
} // namespace gfx
|
2015-05-01 09:54:22 +00:00
|
|
|
|
2014-06-02 03:08:29 +00:00
|
|
|
namespace electron {
|
|
|
|
|
2018-10-25 06:43:50 +00:00
|
|
|
class TrayIconObserver : public base::CheckedObserver {
|
2014-06-02 03:08:29 +00:00
|
|
|
public:
|
2017-10-05 02:49:26 +00:00
|
|
|
virtual void OnClicked(const gfx::Rect& bounds,
|
|
|
|
const gfx::Point& location,
|
|
|
|
int modifiers) {}
|
2015-07-27 10:15:51 +00:00
|
|
|
virtual void OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {}
|
2023-09-27 18:21:15 +00:00
|
|
|
virtual void OnMiddleClicked(const gfx::Rect& bounds, int modifiers) {}
|
2014-11-28 11:42:57 +00:00
|
|
|
virtual void OnBalloonShow() {}
|
2014-11-28 10:50:31 +00:00
|
|
|
virtual void OnBalloonClicked() {}
|
2014-11-28 11:42:57 +00:00
|
|
|
virtual void OnBalloonClosed() {}
|
2015-07-27 10:15:51 +00:00
|
|
|
virtual void OnRightClicked(const gfx::Rect& bounds, int modifiers) {}
|
2015-11-10 16:02:50 +00:00
|
|
|
virtual void OnDrop() {}
|
2015-07-19 04:12:28 +00:00
|
|
|
virtual void OnDropFiles(const std::vector<std::string>& files) {}
|
2016-07-14 17:21:39 +00:00
|
|
|
virtual void OnDropText(const std::string& text) {}
|
2015-11-06 00:45:43 +00:00
|
|
|
virtual void OnDragEntered() {}
|
|
|
|
virtual void OnDragExited() {}
|
2015-11-10 16:02:50 +00:00
|
|
|
virtual void OnDragEnded() {}
|
2020-01-17 16:28:34 +00:00
|
|
|
virtual void OnMouseUp(const gfx::Point& location, int modifiers) {}
|
|
|
|
virtual void OnMouseDown(const gfx::Point& location, int modifiers) {}
|
2017-06-28 19:09:12 +00:00
|
|
|
virtual void OnMouseEntered(const gfx::Point& location, int modifiers) {}
|
|
|
|
virtual void OnMouseExited(const gfx::Point& location, int modifiers) {}
|
2017-08-26 18:04:58 +00:00
|
|
|
virtual void OnMouseMoved(const gfx::Point& location, int modifiers) {}
|
2014-06-02 03:08:29 +00:00
|
|
|
|
|
|
|
protected:
|
2018-10-25 06:43:50 +00:00
|
|
|
~TrayIconObserver() override {}
|
2014-06-02 03:08:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_
|