tray_icon.cc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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::SetTitle(const std::string& title) {}
  10. void TrayIcon::SetHighlightMode(TrayIcon::HighlightMode mode) {}
  11. void TrayIcon::DisplayBalloon(ImageType icon,
  12. const base::string16& title,
  13. const base::string16& contents) {}
  14. void TrayIcon::PopUpContextMenu(const gfx::Point& pos,
  15. AtomMenuModel* menu_model) {}
  16. gfx::Rect TrayIcon::GetBounds() {
  17. return gfx::Rect();
  18. }
  19. void TrayIcon::NotifyClicked(const gfx::Rect& bounds,
  20. const gfx::Point& location,
  21. int modifiers) {
  22. for (TrayIconObserver& observer : observers_)
  23. observer.OnClicked(bounds, location, modifiers);
  24. }
  25. void TrayIcon::NotifyDoubleClicked(const gfx::Rect& bounds, int modifiers) {
  26. for (TrayIconObserver& observer : observers_)
  27. observer.OnDoubleClicked(bounds, modifiers);
  28. }
  29. void TrayIcon::NotifyBalloonShow() {
  30. for (TrayIconObserver& observer : observers_)
  31. observer.OnBalloonShow();
  32. }
  33. void TrayIcon::NotifyBalloonClicked() {
  34. for (TrayIconObserver& observer : observers_)
  35. observer.OnBalloonClicked();
  36. }
  37. void TrayIcon::NotifyBalloonClosed() {
  38. for (TrayIconObserver& observer : observers_)
  39. observer.OnBalloonClosed();
  40. }
  41. void TrayIcon::NotifyRightClicked(const gfx::Rect& bounds, int modifiers) {
  42. for (TrayIconObserver& observer : observers_)
  43. observer.OnRightClicked(bounds, modifiers);
  44. }
  45. void TrayIcon::NotifyDrop() {
  46. for (TrayIconObserver& observer : observers_)
  47. observer.OnDrop();
  48. }
  49. void TrayIcon::NotifyDropFiles(const std::vector<std::string>& files) {
  50. for (TrayIconObserver& observer : observers_)
  51. observer.OnDropFiles(files);
  52. }
  53. void TrayIcon::NotifyDropText(const std::string& text) {
  54. for (TrayIconObserver& observer : observers_)
  55. observer.OnDropText(text);
  56. }
  57. void TrayIcon::NotifyMouseEntered(const gfx::Point& location, int modifiers) {
  58. for (TrayIconObserver& observer : observers_)
  59. observer.OnMouseEntered(location, modifiers);
  60. }
  61. void TrayIcon::NotifyMouseExited(const gfx::Point& location, int modifiers) {
  62. for (TrayIconObserver& observer : observers_)
  63. observer.OnMouseExited(location, modifiers);
  64. }
  65. void TrayIcon::NotifyMouseMoved(const gfx::Point& location, int modifiers) {
  66. for (TrayIconObserver& observer : observers_)
  67. observer.OnMouseMoved(location, modifiers);
  68. }
  69. void TrayIcon::NotifyDragEntered() {
  70. for (TrayIconObserver& observer : observers_)
  71. observer.OnDragEntered();
  72. }
  73. void TrayIcon::NotifyDragExited() {
  74. for (TrayIconObserver& observer : observers_)
  75. observer.OnDragExited();
  76. }
  77. void TrayIcon::NotifyDragEnded() {
  78. for (TrayIconObserver& observer : observers_)
  79. observer.OnDragEnded();
  80. }
  81. } // namespace atom