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