Closed Bug 905103 Opened 6 years ago Closed 6 years ago

Use a about URL for the app manager urls (was "devtools:xxx")

Categories

(DevTools :: Framework, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: paul, Assigned: jryans)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v0.1 (obsolete) — Splinter Review
Because the app manager will live in a tab, and we don't want to show a chrome://... URL, we would like to have a devtools:xxx URL (like about:xxx).

We would have:
- devtools:app-manager
- devtools:device
- devtools:toolbox
Attachment #790137 - Flags: feedback?(mgoodwin)
Gavin, what do you think about that?
Flags: needinfo?(gavin.sharp)
Flags: sec-review?(mgoodwin)
I don't know what the "app manager" is, or what those other URLs will point to - can I read more about that somewhere?

In any case, your own protocol handler seems a bit overkill, and increases the security exposure. Can you just use about: URIs instead?
Flags: needinfo?(gavin.sharp)
Comment on attachment 790137 [details] [diff] [review]
Patch v0.1

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

Like Gavin, I'm not sure I fully understand why we can't use about: for this.

Is there overlap with what Dave was looking at in bug 779197?

::: browser/devtools/components/DevtoolsProtocolHandler.js
@@ +22,5 @@
> +DevtoolsProtocolHandler.prototype = {
> +  scheme: SCHEME,
> +  defaultPort: -1,
> +  protocolFlags: Ci.nsIProtocolHandler.URI_IS_UI_RESOURCE |
> +                 Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE,

Is URI_IS_LOCAL_RESOURCE the right thing to use here? I think unless we explicitly want this to be accessible from web content we should use URI_DANGEROUS_TO_LOAD instead.
Attachment #790137 - Flags: feedback?(mgoodwin) → feedback-
"The App Tools team is responsible for creating tools to help developers debug and inspect apps written for Firefox OS. This includes the development of Firefox OS Simulator and tools in Firefox to connect and debug apps running on devices or in simulator instances."

Mockups: http://htmlpad.org/app-manager/

So basically, we are building a tool called "App Manager" (not the official name yet). It will be accessible from the Web Developer menu. Clicking on "App Manager" will open a new tab in Firefox with the tool inside. The URL of this tool will be:

- chrome://browser/content/devtools/app-manager/projects.xhtml

From this tool, we can open a new tab that will list many information about the currently connected device:

- chrome://browser/content/devtools/app-manager/device.xhtml

And from any of these tools, we can open a DevTools toolbox that is connected to a running app. This toolbox is opened in a new tab as well:

- chrome://browser/content/devtools/toolbox-window.xul

So we want pretty URLs for these 3 pages.

We could use "about:xxx", but the URLs might be confusing. These pages are developer tools. So having urls like "about:app-manager" or "about:device" could be confusing because it's not obvious this is for developers. And maybe in the future we might have an app-manager for users, not for developers. And what if we want to build a tool that is for addons development? How would we call it (about:addons)?

That's why I was thinking about these devtools:xxx urls.

If it's better to use about:xxx urls, could we imagine a "about:dev:xxx" scheme?
Can we hide the URL bar like we do for about:addons?
(In reply to Joe Walker [:jwalker] from comment #5)
> Can we hide the URL bar like we do for about:addons?

This feature will apparently disappear. In Australis, afaik, we will not hide the bar.
Gavin, does comment 4 help?
Flags: needinfo?(gavin.sharp)
about:dev-foo or about:dev:foo (if that works, not sure the URI parser will be happy) seems fine. The main thing I would like to avoid is another protocol handler.
Flags: needinfo?(gavin.sharp)
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #8)
> about:dev-foo or about:dev:foo (if that works, not sure the URI parser will
> be happy) seems fine. The main thing I would like to avoid is another
> protocol handler.

Ok.
Summary: Introduce "devtools:xxx" URL scheme → Use a about:dev URL for the app manager urls (was "devtools:xxx")
Blocks: appmgr_v1
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Summary: Use a about:dev URL for the app manager urls (was "devtools:xxx") → Use a about URL for the app manager urls (was "devtools:xxx")
Add about:app-manager, which is safer than a new protocol as mentioned in previous comments.

Paul checked with the PM team, and we're now more comfortable with about:app-manager instead of about:dev:app-manager.

I'll update the App Manager menu item in a separate bug after this change.
Attachment #790137 - Attachment is obsolete: true
Attachment #802445 - Flags: review?(gavin.sharp)
Attachment #802445 - Flags: review?(gavin.sharp) → review+
Blocks: 914729
Hardware: x86 → All
Whiteboard: [land-in-fx-team]
Whiteboard: [land-in-fx-team]
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/956b5e35b7b7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Flags: sec-review?(mgoodwin) → sec-review+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.