Basic comments to help you get used to devtools style. https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/sdk/SecurityManager.js File Source/devtools/front_end/sdk/SecurityManager.js (right): https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/sdk/SecurityManager.js#newcode10 ...
4 years, 11 months ago
(2015-06-03 10:12:35 UTC)
#3
4 years, 10 months ago
(2015-06-12 06:20:22 UTC)
#5
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/s...
File Source/devtools/front_end/sdk/SecurityManager.js (right):
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/s...
Source/devtools/front_end/sdk/SecurityManager.js:10:
WebInspector.SecurityManager = function(target)
On 2015/06/11 22:54:46, lgarron wrote:
> On 2015/06/03 at 10:12:35, dgozman wrote:
> > Move this to security module, do not add to sdk.
>
> What is the reason to add something to sdk vs. not?
If the thing is self-contained, and nobody depends on it, we should not put it
in sdk.
>
> In an email thread with Pavel, I asked whether to make a SecurityManager or
> SecurityModel, and pfeldman@ suggested the latter – but I can't get that to
> work.
>
> In either case, do I still extend WebInspector.SDKModel?
Yes.
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/s...
File Source/devtools/front_end/security/module.json (right):
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/s...
Source/devtools/front_end/security/module.json:11: "dependencies": [],
On 2015/06/11 22:54:47, lgarron wrote:
> On 2015/06/03 at 10:12:35, dgozman wrote:
> > You probably have to depend on platform, host, and sdk.
>
> What are each of these? The other panels don't have these in their
`module.json`
> files.
> How do I learn how dependencies work?
If you use something (class, function) from a file of another module, you have
to declare the dependency here.
Most of the DOM helpers are in platform module. Targets and models are in sdk.
Not sure about host, maybe you won't need it directly. Do not include unless
compiler complains.
lgarron
Patchset #3 (id:40001) has been deleted
4 years, 10 months ago
(2015-06-12 18:16:30 UTC)
#6
Patchset #3 (id:40001) has been deleted
lgarron
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/security/module.json File Source/devtools/front_end/security/module.json (right): https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/security/module.json#newcode11 Source/devtools/front_end/security/module.json:11: "dependencies": [], On 2015/06/12 at 06:20:22, dgozman wrote: > ...
4 years, 10 months ago
(2015-06-12 19:56:02 UTC)
#7
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/s...
File Source/devtools/front_end/security/module.json (right):
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/s...
Source/devtools/front_end/security/module.json:11: "dependencies": [],
On 2015/06/12 at 06:20:22, dgozman wrote:
> On 2015/06/11 22:54:47, lgarron wrote:
> > On 2015/06/03 at 10:12:35, dgozman wrote:
> > > You probably have to depend on platform, host, and sdk.
> >
> > What are each of these? The other panels don't have these in their
`module.json`
> > files.
> > How do I learn how dependencies work?
>
> If you use something (class, function) from a file of another module, you have
to declare the dependency here.
> Most of the DOM helpers are in platform module. Targets and models are in sdk.
Not sure about host, maybe you won't need it directly. Do not include unless
compiler complains.
Makes sense. I didn't know anything about the compiler, but I'm assuming `git cl
presubmit --upload` gives the relevant output.
I found that the compiler is just as happy without "platform" and "host", but
needs "sdk". It also seems to need "ui". So, right now I have:
"dependencies": ["platform", "ui", "sdk"]
Is there something else I should be using in "ui"?
https://codereview.chromium.org/1159163005/diff/20001/Source/devtools/front_e...
File Source/devtools/front_end/sdk/Target.js (right):
https://codereview.chromium.org/1159163005/diff/20001/Source/devtools/front_e...
Source/devtools/front_end/sdk/Target.js:116: this.securityManager = new
WebInspector.SecurityManager(this);
If I move SecurityManager.js to security/ instead of sdk/, then the compiler
complains about this. However, removing it breaks the functionality we need.
What should I do as an alternative?
lgarron
Patchset #5 (id:100001) has been deleted
4 years, 10 months ago
(2015-06-12 23:45:10 UTC)
#8
Patchset #5 (id:100001) has been deleted
dgozman
https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/security/module.json File Source/devtools/front_end/security/module.json (right): https://codereview.chromium.org/1159163005/diff/1/Source/devtools/front_end/security/module.json#newcode11 Source/devtools/front_end/security/module.json:11: "dependencies": [], > Makes sense. I didn't know anything ...
4 years, 10 months ago
(2015-06-15 16:58:42 UTC)
#9
dgozman@: Thanks, that was pretty helpful. I've done everything I could figure out how to ...
4 years, 10 months ago
(2015-06-15 22:38:09 UTC)
#10
dgozman@: Thanks, that was pretty helpful. I've done everything I could figure
out how to do, and left comments on the rest.
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
File Source/devtools/front_end/sdk/SecurityManager.js (right):
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
Source/devtools/front_end/sdk/SecurityManager.js:24:
WebInspector.SecurityManager.prototype = {
On 2015/06/15 at 16:58:41, dgozman wrote:
> Don't you need a |securityState()| getter?
Depends on how we use this as a model/manager.
We will probably have to add a protocol command to retrieve the initial security
state, which would effectively do the same.
Is it still worth creating a getter for a cached value?
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
File Source/devtools/front_end/security/SecurityPanel.js (right):
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
Source/devtools/front_end/security/SecurityPanel.js:14:
WebInspector.targetManager.addModelListener(WebInspector.SecurityManager,
WebInspector.SecurityManager.EventTypes.SecurityStateChanged,
this._onSecurityStateChanged, this);
On 2015/06/15 at 16:58:41, dgozman wrote:
> Will you have security for different frames or workers? Perhaps, you should
call SecurityModel.fromTarget(WebInspector.targetManager.mainTarget()) and
listen to that particular instance.
We might someday, but it's fine not to have them for now.
I tried
WebInspector.SecurityModel.fromTarget(WebInspector.targetManager.mainTarget()),
but it appears that WebInspector.targetManager.mainTarget() is null here if the
SecurityPanel is the current panel when DevTools is brought up. This breaks the
panel and makes the linter sad. Is there a more robust alternative?
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
Source/devtools/front_end/security/SecurityPanel.js:47:
this._updateSecurityState("unknown");
On 2015/06/15 at 16:58:41, dgozman wrote:
> Better move the default "unknown" state into model, and ask it explicitly
here.
Sounds like a good use for a securityState() getter in the manager, so I've done
that. :-)
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
File Source/devtools/front_end/security/securityPanel.css (right):
https://codereview.chromium.org/1159163005/diff/120001/Source/devtools/front_...
Source/devtools/front_end/security/securityPanel.css:20: background-image:
url(Images/securityStateHttp.png);
On 2015/06/15 at 16:58:42, dgozman wrote:
> Don't use default one.
What do you recommend instead?
- No background
- CSS background fallback
- Fallback icon
- Create an icon for "unknown" and also use it for fallback?
lgarron
(Just uploaded the latest patch. It failed earlier in the day because of the WebInspector.targetManager.mainTarget() ...
4 years, 10 months ago
(2015-06-16 01:03:34 UTC)
#11
Issue 1159163005: Add a minimal Security panel to DevTools (behind a hidden experiment).
(Closed)
Created 4 years, 11 months ago by lgarron
Modified 4 years, 10 months ago
Reviewers: dgozman
Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Comments: 68