tray_icon.cc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // Copyright (c) 2014 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "atom/browser/ui/tray_icon.h"
  5. namespace atom {
  6. TrayIcon::TrayIcon() {}
  7. TrayIcon::~TrayIcon() {}
  8. void TrayIcon::SetPressedImage(ImageType image) {}
  9. void TrayIcon::SetHighlightMode(TrayIcon::HighlightMode mode) {}
  10. void TrayIcon::DisplayBalloon(ImageType icon,
  11. const base::string16& title,
  12. const base::string16& contents) {}
  13. void TrayIcon::PopUpContextMenu(const gfx::Point& pos,
  14. AtomMenuModel* menu_model) {}
  15. gfx::Rect TrayIcon::GetBounds() {
  16. return gfx::Rect();
  17. }
  18. void TrayIcon::NotifyClicked(const gfx::Rect& bounds,
  19. const gfx::Point& location,
  20. int modifiers) {
  21. for (TrayIconObserver& observer : observers_)
  22. observer.OnClicked(bounds, location, modifiers);
  23. }
  24. void TrayIcon::NotifyDoubleClicked(const gfx::Rect& bounds, int modifiers) {
  25. for (TrayIconObserver& observer : observers_)
  26. observer.OnDoubleClicked(bounds, modifiers);
  27. }
  28. void TrayIcon::NotifyBalloonShow() {
  29. for (TrayIconObserver& observer : observers_)
  30. observer.OnBalloonShow();
  31. }
  32. void TrayIcon::NotifyBalloonClicked() {
  33. for (TrayIconObserver& observer : observers_)
  34. observer.OnBalloonClicked();
  35. }
  36. void TrayIcon::NotifyBalloonClosed() {
  37. for (TrayIconObserver& observer : observers_)
  38. observer.OnBalloonClosed();
  39. }
  40. void TrayIcon::NotifyRightClicked(const gfx::Rect& bounds, int modifiers) {
  41. for (TrayIconObserver& observer : observers_)
  42. observer.OnRightClicked(bounds, modifiers);
  43. }
  44. void TrayIcon::NotifyDrop() {
  45. for (TrayIconObserver& observer : observers_)
  46. observer.OnDrop();
  47. }
  48. void TrayIcon::NotifyDropFiles(const std::vector<std::string>& files) {
  49. for (TrayIconObserver& observer : observers_)
  50. observer.OnDropFiles(files);
  51. }
  52. void TrayIcon::NotifyDropText(const std::string& text) {
  53. for (TrayIconObserver& observer : observers_)
  54. observer.OnDropText(text);
  55. }
  56. void TrayIcon::NotifyMouseEntered(const gfx::Point& location, int modifiers) {
  57. for (TrayIconObserver& observer : observers_)
  58. observer.OnMouseEntered(location, modifiers);
  59. }
  60. void TrayIcon::NotifyMouseExited(const gfx::Point& location, int modifiers) {
  61. for (TrayIconObserver& observer : observers_)
  62. observer.OnMouseExited(location, modifiers);
  63. }
  64. void TrayIcon::NotifyMouseMoved(const gfx::Point& location, int modifiers) {
  65. for (TrayIconObserver& observer : observers_)
  66. observer.OnMouseMoved(location, modifiers);
  67. }
  68. void TrayIcon::NotifyDragEntered() {
  69. for (TrayIconObserver& observer : observers_)
  70. observer.OnDragEntered();
  71. }
  72. void TrayIcon::NotifyDragExited() {
  73. for (TrayIconObserver& observer : observers_)
  74. observer.OnDragExited();
  75. }
  76. void TrayIcon::NotifyDragEnded() {
  77. for (TrayIconObserver& observer : observers_)
  78. observer.OnDragEnded();
  79. }
  80. } // namespace atom