Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 2629573006: chromeos: Add Power device page to chrome://md-settings. (Closed)

Created:
3 years, 11 months ago by Daniel Erat
Modified:
3 years, 9 months ago
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, vitalyp+closure_chromium.org, dbeam+watch-settings_chromium.org, dbeam+watch-closure_chromium.org, stevenjb+watch-md-settings_chromium.org, jlklein+watch-closure_chromium.org, stevenjb
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: Add Power device page to chrome://md-settings. Move the power row into its own subpage in anticipation of adding additional settings. BUG=633484, 633455 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2629573006 Cr-Commit-Position: refs/heads/master@{#454136} Committed: https://chromium.googlesource.com/chromium/src/+/8f2dc13d423abd8414e6bd5624aa516fcb1e683d

Patch Set 1 #

Patch Set 2 : update copyright year #

Total comments: 4

Patch Set 3 : update now that power source settings exist #

Total comments: 24

Patch Set 4 : apply review feedback #

Total comments: 2

Patch Set 5 : merge #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -148 lines) Patch
M chrome/app/settings_strings.grdp View 1 2 3 4 1 chunk +8 lines, -5 lines 0 comments Download
M chrome/browser/resources/settings/device_page/compiled_resources2.gyp View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/device_page/device_page.html View 1 2 3 4 5 chunks +16 lines, -27 lines 0 comments Download
M chrome/browser/resources/settings/device_page/device_page.js View 1 2 3 4 5 chunks +6 lines, -107 lines 0 comments Download
A chrome/browser/resources/settings/device_page/power.html View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/resources/settings/device_page/power.js View 1 2 3 1 chunk +143 lines, -0 lines 8 comments Download
M chrome/browser/resources/settings/route.js View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/settings_resources.grd View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/webui/settings/device_page_tests.js View 1 2 2 chunks +14 lines, -8 lines 0 comments Download

Messages

Total messages: 55 (28 generated)
Daniel Erat
i've pulled out part of my existing code to at least add an empty subpage ...
3 years, 11 months ago (2017-01-13 02:00:43 UTC) #6
Dan Beam
stevenjb@: do you want to add this right now?
3 years, 11 months ago (2017-01-13 02:36:31 UTC) #9
stevenjb
derat@ - Let's hide this by default for now like we do with touch calibration ...
3 years, 11 months ago (2017-01-13 16:40:49 UTC) #13
michaelpg
On 2017/01/13 02:36:31, Dan Beam wrote: > stevenjb@: do you want to add this right ...
3 years, 11 months ago (2017-01-13 17:15:21 UTC) #14
michaelpg
https://codereview.chromium.org/2629573006/diff/20001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/20001/chrome/browser/resources/settings/device_page/power.js#newcode9 chrome/browser/resources/settings/device_page/power.js:9: nit: remove blank line https://codereview.chromium.org/2629573006/diff/20001/chrome/browser/resources/settings/device_page/power.js#newcode15 chrome/browser/resources/settings/device_page/power.js:15: prefs: { will ...
3 years, 11 months ago (2017-01-13 17:15:35 UTC) #15
Daniel Erat
we don't have any top-level non-subpage rows in device right now, do we? https://codereview.chromium.org/2629573006/diff/20001/chrome/browser/resources/settings/device_page/power.js File ...
3 years, 11 months ago (2017-01-13 17:34:08 UTC) #16
michaelpg
On 2017/01/13 17:34:08, Daniel Erat wrote: > we don't have any top-level non-subpage rows in ...
3 years, 11 months ago (2017-01-13 21:15:04 UTC) #17
Daniel Erat
On 2017/01/13 21:15:04, michaelpg (NYC) wrote: > On 2017/01/13 17:34:08, Daniel Erat wrote: > > ...
3 years, 11 months ago (2017-01-13 21:19:40 UTC) #18
michaelpg
On 2017/01/13 21:19:40, Daniel Erat wrote: > On 2017/01/13 21:15:04, michaelpg (NYC) wrote: > > ...
3 years, 11 months ago (2017-01-13 22:18:36 UTC) #19
Daniel Erat
On 2017/01/13 22:18:36, michaelpg (NYC) wrote: > On 2017/01/13 21:19:40, Daniel Erat wrote: > > ...
3 years, 11 months ago (2017-01-13 22:20:52 UTC) #20
Daniel Erat
i've finally merged this with the power row. mind taking another look? https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.js File chrome/browser/resources/settings/device_page/device_page.js ...
3 years, 9 months ago (2017-03-01 02:43:31 UTC) #25
michaelpg
overall looks good, some clean-up to do after the move though. https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.html File chrome/browser/resources/settings/device_page/device_page.html (right): ...
3 years, 9 months ago (2017-03-01 05:20:39 UTC) #28
stevenjb
https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.html File chrome/browser/resources/settings/device_page/device_page.html (right): https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.html#newcode106 chrome/browser/resources/settings/device_page/device_page.html:106: <template is="dom-if" route-path="/power"> This is a subtle issue I ...
3 years, 9 months ago (2017-03-01 17:19:43 UTC) #29
Daniel Erat
https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.html File chrome/browser/resources/settings/device_page/device_page.html (right): https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.html#newcode2 chrome/browser/resources/settings/device_page/device_page.html:2: <link rel="import" href="chrome://resources/html/md_select_css.html"> On 2017/03/01 05:20:38, michaelpg wrote: > ...
3 years, 9 months ago (2017-03-01 23:01:54 UTC) #30
stevenjb
lgtm https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.js File chrome/browser/resources/settings/device_page/device_page.js (right): https://codereview.chromium.org/2629573006/diff/40001/chrome/browser/resources/settings/device_page/device_page.js#newcode29 chrome/browser/resources/settings/device_page/device_page.js:29: hasMouse_: {type: Boolean, value: false}, On 2017/03/01 23:01:53, ...
3 years, 9 months ago (2017-03-01 23:15:39 UTC) #35
michaelpg
lgtm https://codereview.chromium.org/2629573006/diff/60001/chrome/browser/resources/settings/device_page/device_page.js File chrome/browser/resources/settings/device_page/device_page.js (right): https://codereview.chromium.org/2629573006/diff/60001/chrome/browser/resources/settings/device_page/device_page.js#newcode31 chrome/browser/resources/settings/device_page/device_page.js:31: value: false, (just make sure this gets rebased ...
3 years, 9 months ago (2017-03-01 23:39:12 UTC) #36
Daniel Erat
https://codereview.chromium.org/2629573006/diff/60001/chrome/browser/resources/settings/device_page/device_page.js File chrome/browser/resources/settings/device_page/device_page.js (right): https://codereview.chromium.org/2629573006/diff/60001/chrome/browser/resources/settings/device_page/device_page.js#newcode31 chrome/browser/resources/settings/device_page/device_page.js:31: value: false, On 2017/03/01 23:39:12, michaelpg wrote: > (just ...
3 years, 9 months ago (2017-03-02 00:17:47 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2629573006/80001
3 years, 9 months ago (2017-03-02 01:09:59 UTC) #43
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/8f2dc13d423abd8414e6bd5624aa516fcb1e683d
3 years, 9 months ago (2017-03-02 01:35:32 UTC) #46
Dan Beam
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); this should only be called if (this.enablePowerSettings) this ...
3 years, 9 months ago (2017-03-14 21:50:09 UTC) #48
Daniel Erat
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); On 2017/03/14 21:50:09, Dan Beam wrote: > this ...
3 years, 9 months ago (2017-03-14 22:08:16 UTC) #49
stevenjb
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); On 2017/03/14 22:08:16, Daniel Erat wrote: > On ...
3 years, 9 months ago (2017-03-14 22:17:44 UTC) #50
Dan Beam
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); On 2017/03/14 22:17:44, stevenjb wrote: > On 2017/03/14 ...
3 years, 9 months ago (2017-03-14 22:27:24 UTC) #51
Daniel Erat
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); On 2017/03/14 22:27:24, Dan Beam wrote: > On ...
3 years, 9 months ago (2017-03-14 22:56:51 UTC) #52
stevenjb
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); On 2017/03/14 22:27:24, Dan Beam wrote: > On ...
3 years, 9 months ago (2017-03-14 23:08:14 UTC) #53
Dan Beam
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js File chrome/browser/resources/settings/device_page/power.js (right): https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resources/settings/device_page/power.js#newcode74 chrome/browser/resources/settings/device_page/power.js:74: settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus(); On 2017/03/14 23:08:14, stevenjb wrote: > On 2017/03/14 ...
3 years, 9 months ago (2017-03-14 23:17:39 UTC) #54
Daniel Erat
3 years, 9 months ago (2017-03-15 00:16:38 UTC) #55
Message was sent while issue was closed.
https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resource...
File chrome/browser/resources/settings/device_page/power.js (right):

https://codereview.chromium.org/2629573006/diff/80001/chrome/browser/resource...
chrome/browser/resources/settings/device_page/power.js:74:
settings.DevicePageBrowserProxyImpl.getInstance().updatePowerStatus();
On 2017/03/14 23:17:39, Dan Beam wrote:
> On 2017/03/14 23:08:14, stevenjb wrote:
> > On 2017/03/14 22:27:24, Dan Beam wrote:
> > > On 2017/03/14 22:17:44, stevenjb wrote:
> > > > On 2017/03/14 22:08:16, Daniel Erat wrote:
> > > > > On 2017/03/14 21:50:09, Dan Beam wrote:
> > > > > > this should only be called if (this.enablePowerSettings)
> > > > > > 
> > > > > > this is causing an unhandled chrome.send() messages (and hitting
> > > > NOTREACHED()
> > > > > in
> > > > > > web_ui_impl.cc)
> > > > > 
> > > > > thanks for pointing that out. i'll send a fix.
> > > > > 
> > > > > but i'm also a bit confused, since it sounded (from what steven said,
i
> > > think)
> > > > > like this would never be attached if the settings were disabled.
> > > > 
> > > > dbeam@ - This should be protected by a dom-if, in device_page.html?
> > > 
> > > search for device -> asplode
> > 
> > I wasn't so much looking for a repro as for an understanding as to why this
> > occurs so that we can avoid it in the future, although mentioning 'search'
> > triggers a vague recollection that we expand all templates not marked as no
> > search? So if that is the case, a quick fix might be to mark this page as no
> > search for now, and/or create a compound if for the section that includes
> > enablePowerSettings_.
> > 
> > 
> 
> or just wrap this code in an if (this.enablePowerSettings) again

uploaded https://codereview.chromium.org/2751873002/

Powered by Google App Engine
This is Rietveld 408576698