tray_icon.cc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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, int modifiers) {
  27. for (TrayIconObserver& observer : observers_)
  28. observer.OnClicked(bounds, modifiers);
  29. }
  30. void TrayIcon::NotifyDoubleClicked(const gfx::Rect& bounds, int modifiers) {
  31. for (TrayIconObserver& observer : observers_)
  32. observer.OnDoubleClicked(bounds, modifiers);
  33. }
  34. void TrayIcon::NotifyBalloonShow() {
  35. for (TrayIconObserver& observer : observers_)
  36. observer.OnBalloonShow();
  37. }
  38. void TrayIcon::NotifyBalloonClicked() {
  39. for (TrayIconObserver& observer : observers_)
  40. observer.OnBalloonClicked();
  41. }
  42. void TrayIcon::NotifyBalloonClosed() {
  43. for (TrayIconObserver& observer : observers_)
  44. observer.OnBalloonClosed();
  45. }
  46. void TrayIcon::NotifyRightClicked(const gfx::Rect& bounds, int modifiers) {
  47. for (TrayIconObserver& observer : observers_)
  48. observer.OnRightClicked(bounds, modifiers);
  49. }
  50. void TrayIcon::NotifyDrop() {
  51. for (TrayIconObserver& observer : observers_)
  52. observer.OnDrop();
  53. }
  54. void TrayIcon::NotifyDropFiles(const std::vector<std::string>& files) {
  55. for (TrayIconObserver& observer : observers_)
  56. observer.OnDropFiles(files);
  57. }
  58. void TrayIcon::NotifyDropText(const std::string& text) {
  59. for (TrayIconObserver& observer : observers_)
  60. observer.OnDropText(text);
  61. }
  62. void TrayIcon::NotifyDragEntered() {
  63. for (TrayIconObserver& observer : observers_)
  64. observer.OnDragEntered();
  65. }
  66. void TrayIcon::NotifyDragExited() {
  67. for (TrayIconObserver& observer : observers_)
  68. observer.OnDragExited();
  69. }
  70. void TrayIcon::NotifyDragEnded() {
  71. for (TrayIconObserver& observer : observers_)
  72. observer.OnDragEnded();
  73. }
  74. } // namespace atom