tray_icon.cc 3.0 KB

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