[Webkit-unassigned] [Bug 62698] [DOM] Support for battery status event

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 27 10:38:52 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62698


Leandro Pereira <leandro at profusion.mobi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #97938|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #17 from Leandro Pereira <leandro at profusion.mobi>  2011-06-27 10:38:50 PST ---
(From update of attachment 97938)
View in context: https://bugs.webkit.org/attachment.cgi?id=97938&action=review

> Source/WebCore/dom/BatteryStatusClient.h:34
> +    virtual void setBatteryStatus(bool isPlugged, float level) = 0;

Prefer enums to booleans.

> Source/WebCore/dom/BatteryStatusController.cpp:74
> +    Vector<RefPtr<DOMWindow> > listenersVector;

Stray space after <DOMWindow>.

> Source/WebCore/dom/BatteryStatusController.cpp:78
> +    for (size_t i = 0; i < listenersVector.size(); ++i)
> +        listenersVector[i]->dispatchEvent(event);

You should use a better name than 'i'.

> Source/WebCore/dom/BatteryStatusController.h:43
> +    void didChangeBatteryStatus(bool isPlugged, float level);

Prefer enums to booleans. Also, no parameter names on header files.

> Source/WebCore/dom/BatteryStatusController.h:50
> +    typedef HashCountedSet<RefPtr<DOMWindow> > ListenersCountedSet;

Stray space after <DOMWindow>.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list