Conver MozPowerManager to WebIDL

RESOLVED FIXED in mozilla26

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Tracking

unspecified
mozilla26
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 798335 [details] [diff] [review]
Patch
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Attachment #798335 - Flags: review?(Ms2ger)
Comment on attachment 798335 [details] [diff] [review]
Patch

Review of attachment 798335 [details] [diff] [review]:
-----------------------------------------------------------------

r=me

::: dom/bindings/Bindings.conf
@@ +768,5 @@
>  },
>  
> +'MozPowerManager': {
> +    'nativeType': 'mozilla::dom::power::PowerManager',
> +    'headerFile': 'mozilla/dom/power/PowerManager.h'

Shouldn't need the headerFile. Followup to get rid of the namespace, please.

::: dom/power/PowerManager.cpp
@@ +98,3 @@
>  PowerManager::AddWakeLockListener(nsIDOMMozWakeLockListener *aListener)
>  {
>    // already added? bail out.

Not exactly "bailing out" anymore

@@ +110,4 @@
>  }
>  
> +void
> +PowerManager::GetWakeLockState(const nsAString &aTopic,

& to the left

::: dom/power/PowerManager.h
@@ +30,3 @@
>    NS_DECL_NSIDOMMOZWAKELOCKLISTENER
>  
> +  PowerManager() {

{ on the next line

@@ +40,5 @@
>  
>    static already_AddRefed<PowerManager> CreateInstance(nsPIDOMWindow*);
>  
> +  // WebIDL
> +  nsIDOMWindow* GetParentObject() {

Ditto, and const

@@ +43,5 @@
> +  // WebIDL
> +  nsIDOMWindow* GetParentObject() {
> +    return mWindow;
> +  }
> +  virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> scope) MOZ_OVERRIDE;

aCx, * to the left, aScope

@@ +50,5 @@
> +  void PowerOff(ErrorResult& aRv);
> +  void AddWakeLockListener(nsIDOMMozWakeLockListener *aListener);
> +  void RemoveWakeLockListener(nsIDOMMozWakeLockListener *aListener);
> +  void GetWakeLockState(const nsAString &aTopic, nsAString &aState,
> +                        ErrorResult& aRv);

*s and &s to the left

::: dom/power/nsIDOMPowerManager.idl
@@ -1,1 @@
> -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

Consider hg mv
Comment on attachment 798335 [details] [diff] [review]
Patch

>From: David Zbarsky <dzbarsky@gmail.com>
>try: -b d -p macosx64

And fix the commit message.
Attachment #798335 - Flags: review?(Ms2ger) → review+
https://hg.mozilla.org/mozilla-central/rev/3f5a70095b1d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.