diff --git a/atom/browser/api/atom_api_tray.cc b/atom/browser/api/atom_api_tray.cc index d8cc54ecf6de..e40d7660eaed 100644 --- a/atom/browser/api/atom_api_tray.cc +++ b/atom/browser/api/atom_api_tray.cc @@ -86,7 +86,9 @@ mate::WrappableBase* Tray::New(mate::Handle image, return new Tray(args->isolate(), args->GetThis(), image); } -void Tray::OnClicked(const gfx::Rect& bounds, const gfx::Point& location, int modifiers) { +void Tray::OnClicked(const gfx::Rect& bounds, + const gfx::Point& location, + int modifiers) { EmitWithFlags("click", modifiers, bounds, location); } diff --git a/atom/browser/api/atom_api_tray.h b/atom/browser/api/atom_api_tray.h index 9e722cb4e603..e1445161a6d2 100644 --- a/atom/browser/api/atom_api_tray.h +++ b/atom/browser/api/atom_api_tray.h @@ -47,7 +47,9 @@ class Tray : public mate::TrackableObject, ~Tray() override; // TrayIconObserver: - void OnClicked(const gfx::Rect& bounds, const gfx::Point& location, int modifiers) override; + void OnClicked(const gfx::Rect& bounds, + const gfx::Point& location, + int modifiers) override; void OnDoubleClicked(const gfx::Rect& bounds, int modifiers) override; void OnRightClicked(const gfx::Rect& bounds, int modifiers) override; void OnBalloonShow() override; diff --git a/atom/browser/ui/tray_icon.cc b/atom/browser/ui/tray_icon.cc index f4a72c8cc250..240c8f73f856 100644 --- a/atom/browser/ui/tray_icon.cc +++ b/atom/browser/ui/tray_icon.cc @@ -34,7 +34,9 @@ gfx::Rect TrayIcon::GetBounds() { return gfx::Rect(); } -void TrayIcon::NotifyClicked(const gfx::Rect& bounds, const gfx::Point& location, int modifiers) { +void TrayIcon::NotifyClicked(const gfx::Rect& bounds, + const gfx::Point& location, + int modifiers) { for (TrayIconObserver& observer : observers_) observer.OnClicked(bounds, location, modifiers); } diff --git a/atom/browser/ui/tray_icon.h b/atom/browser/ui/tray_icon.h index f5d8887d674f..b396a3a807d8 100644 --- a/atom/browser/ui/tray_icon.h +++ b/atom/browser/ui/tray_icon.h @@ -70,7 +70,9 @@ class TrayIcon { void AddObserver(TrayIconObserver* obs) { observers_.AddObserver(obs); } void RemoveObserver(TrayIconObserver* obs) { observers_.RemoveObserver(obs); } - void NotifyClicked(const gfx::Rect& = gfx::Rect(), const gfx::Point& location = gfx::Point(), int modifiers = 0); + void NotifyClicked(const gfx::Rect& = gfx::Rect(), + const gfx::Point& location = gfx::Point(), + int modifiers = 0); void NotifyDoubleClicked(const gfx::Rect& = gfx::Rect(), int modifiers = 0); void NotifyBalloonShow(); void NotifyBalloonClicked(); diff --git a/atom/browser/ui/tray_icon_cocoa.mm b/atom/browser/ui/tray_icon_cocoa.mm index cac3ca0abdc4..75d4fe908a4d 100644 --- a/atom/browser/ui/tray_icon_cocoa.mm +++ b/atom/browser/ui/tray_icon_cocoa.mm @@ -249,7 +249,7 @@ const CGFloat kVerticalTitleMargin = 2; if (event.clickCount == 1) trayIcon_->NotifyClicked( gfx::ScreenRectFromNSRect(event.window.frame), - gfx::ScreenPointFromNSPoint([event locationInWindow]), + gfx::ScreenPointFromNSPoint([event locationInWindow]), ui::EventFlagsFromModifiers([event modifierFlags])); // Double click event. diff --git a/atom/browser/ui/tray_icon_observer.h b/atom/browser/ui/tray_icon_observer.h index 34a7ff369409..8213e8799eb8 100644 --- a/atom/browser/ui/tray_icon_observer.h +++ b/atom/browser/ui/tray_icon_observer.h @@ -17,7 +17,9 @@ namespace atom { class TrayIconObserver { public: - virtual void OnClicked(const gfx::Rect& bounds, const gfx::Point& location, int modifiers) {} + virtual void OnClicked(const gfx::Rect& bounds, + const gfx::Point& location, + int modifiers) {} virtual void OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {} virtual void OnBalloonShow() {} virtual void OnBalloonClicked() {}