Fix cpplint warnings

This commit is contained in:
Cheng Zhao 2017-10-05 11:49:26 +09:00
parent 0b205019b6
commit 4342480473
6 changed files with 16 additions and 6 deletions

View file

@ -86,7 +86,9 @@ mate::WrappableBase* Tray::New(mate::Handle<NativeImage> image,
return new Tray(args->isolate(), args->GetThis(), 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); EmitWithFlags("click", modifiers, bounds, location);
} }

View file

@ -47,7 +47,9 @@ class Tray : public mate::TrackableObject<Tray>,
~Tray() override; ~Tray() override;
// TrayIconObserver: // 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 OnDoubleClicked(const gfx::Rect& bounds, int modifiers) override;
void OnRightClicked(const gfx::Rect& bounds, int modifiers) override; void OnRightClicked(const gfx::Rect& bounds, int modifiers) override;
void OnBalloonShow() override; void OnBalloonShow() override;

View file

@ -34,7 +34,9 @@ gfx::Rect TrayIcon::GetBounds() {
return gfx::Rect(); 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_) for (TrayIconObserver& observer : observers_)
observer.OnClicked(bounds, location, modifiers); observer.OnClicked(bounds, location, modifiers);
} }

View file

@ -70,7 +70,9 @@ class TrayIcon {
void AddObserver(TrayIconObserver* obs) { observers_.AddObserver(obs); } void AddObserver(TrayIconObserver* obs) { observers_.AddObserver(obs); }
void RemoveObserver(TrayIconObserver* obs) { observers_.RemoveObserver(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 NotifyDoubleClicked(const gfx::Rect& = gfx::Rect(), int modifiers = 0);
void NotifyBalloonShow(); void NotifyBalloonShow();
void NotifyBalloonClicked(); void NotifyBalloonClicked();

View file

@ -249,7 +249,7 @@ const CGFloat kVerticalTitleMargin = 2;
if (event.clickCount == 1) if (event.clickCount == 1)
trayIcon_->NotifyClicked( trayIcon_->NotifyClicked(
gfx::ScreenRectFromNSRect(event.window.frame), gfx::ScreenRectFromNSRect(event.window.frame),
gfx::ScreenPointFromNSPoint([event locationInWindow]), gfx::ScreenPointFromNSPoint([event locationInWindow]),
ui::EventFlagsFromModifiers([event modifierFlags])); ui::EventFlagsFromModifiers([event modifierFlags]));
// Double click event. // Double click event.

View file

@ -17,7 +17,9 @@ namespace atom {
class TrayIconObserver { class TrayIconObserver {
public: 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 OnDoubleClicked(const gfx::Rect& bounds, int modifiers) {}
virtual void OnBalloonShow() {} virtual void OnBalloonShow() {}
virtual void OnBalloonClicked() {} virtual void OnBalloonClicked() {}