Chromium Code Reviews
Help | Chromium Project | Sign in
(419)

Issue 2935011: Initial accounts options page. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 10 months ago by xiyuan
Modified:
4 years ago
Reviewers:
Chris Masone, arv, zel
CC:
chromium-reviews, davemoore+watch_chromium.org, ben+cc_chromium.org, James Hawkins, tfarina, arv
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Initial accounts options page. - Add a "Accounts" subpage for ChromeOS; - Two checkboxes for allowing BWSI and allowing guest signin; - Make measureItem in list.js returns 0 instead of -1. The itemHeight is -1 when the list is not visible. And 0 will let redraw to call measureItem again; - Add an onVisibilityChanged callback that is called when "visible" property is changed; And use that to trigger user list's redraw; - Use a mock settings object so that the UI flow could be tested; - Update options_page.css to add a few css missed from dhg's overlay cl; BUG=chromium-os:4734 TEST=None. This is a draft version and will be changed after UX feedbacks. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52676

Patch Set 1 #

Total comments: 71

Patch Set 2 : refactoring per zel & arv #

Total comments: 4

Patch Set 3 : use JsonToValue per arv and renaming per zel #

Total comments: 6

Patch Set 4 : address arv's comments #

Patch Set 5 : use ListItem directly for now per arv #

Unified diffs Side-by-side diffs Delta from patch set Stats (+857 lines, -56 lines) Patch
M chrome/app/generated_resources.grd View 1 3 chunks +22 lines, -2 lines 0 comments Download
A chrome/browser/chromeos/cros_settings.h View 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/cros_settings.cc View 1 chunk +75 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/cros_settings_names.h View 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/cros_settings_names.cc View 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/dom_ui/accounts_options_handler.h View 1 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/dom_ui/accounts_options_handler.cc View 1 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.h View 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/dom_ui/core_chromeos_options_handler.cc View 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/mock_cros_settings.h View 1 chunk +30 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/mock_cros_settings.cc View 1 chunk +36 lines, -0 lines 0 comments Download
M chrome/browser/dom_ui/core_options_handler.h View 2 3 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/dom_ui/core_options_handler.cc View 1 2 7 chunks +55 lines, -41 lines 0 comments Download
M chrome/browser/dom_ui/options_ui.cc View 1 2 3 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/resources/options.html View 1 2 5 chunks +19 lines, -2 lines 0 comments Download
A chrome/browser/resources/options/chromeos_accounts_add_user_overlay.html View 1 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/resources/options/chromeos_accounts_add_user_overlay.js View 1 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/resources/options/chromeos_accounts_options.html View 1 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/resources/options/chromeos_accounts_options.js View 1 1 chunk +64 lines, -0 lines 0 comments Download
A chrome/browser/resources/options/chromeos_accounts_options_page.css View 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/browser/resources/options/chromeos_accounts_user_list.js View 1 2 3 4 1 chunk +105 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/options_page.css View 1 2 3 2 chunks +27 lines, -1 line 0 comments Download
M chrome/browser/resources/options/options_page.js View 1 2 5 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/preferences.js View 2 2 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/resources/shared/js/cr/ui/array_data_model.js View 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/resources/shared/js/cr/ui/list.js View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 chunks +13 lines, -2 lines 0 comments Download
Commit: CQ not working?

Messages

Total messages: 14 (0 generated)
xiyuan
4 years, 10 months ago (2010-07-14 18:26:15 UTC) #1
zel
http://codereview.chromium.org/2935011/diff/1/3 File chrome/browser/chromeos/dom_ui/accounts_options_handler.cc (right): http://codereview.chromium.org/2935011/diff/1/3#newcode21 chrome/browser/chromeos/dom_ui/accounts_options_handler.cc:21: class MockCrosAccountsSettings : public DictionaryValue { 1. move the ...
4 years, 10 months ago (2010-07-14 19:03:23 UTC) #2
tfarina
Minor comment below. http://codereview.chromium.org/2935011/diff/1/3 File chrome/browser/chromeos/dom_ui/accounts_options_handler.cc (right): http://codereview.chromium.org/2935011/diff/1/3#newcode16 chrome/browser/chromeos/dom_ui/accounts_options_handler.cc:16: static const wchar_t* kAccountsPrefAllowBWSI = L"cros.accounts.allowBWSI"; ...
4 years, 10 months ago (2010-07-14 19:11:10 UTC) #3
arv
http://codereview.chromium.org/2935011/diff/1/3 File chrome/browser/chromeos/dom_ui/accounts_options_handler.cc (right): http://codereview.chromium.org/2935011/diff/1/3#newcode101 chrome/browser/chromeos/dom_ui/accounts_options_handler.cc:101: if (!param_values->Get(0, &name_element) || GetString http://codereview.chromium.org/2935011/diff/1/3#newcode116 chrome/browser/chromeos/dom_ui/accounts_options_handler.cc:116: base::JSONReader::Read(json_string, false); ...
4 years, 10 months ago (2010-07-14 22:40:09 UTC) #4
xiyuan
Sorry the CL gets bigger and bigger. Addressed all comments and the biggest change of ...
4 years, 10 months ago (2010-07-15 20:48:16 UTC) #5
arv
http://codereview.chromium.org/2935011/diff/1/3 File chrome/browser/chromeos/dom_ui/accounts_options_handler.cc (right): http://codereview.chromium.org/2935011/diff/1/3#newcode116 chrome/browser/chromeos/dom_ui/accounts_options_handler.cc:116: base::JSONReader::Read(json_string, false); On 2010/07/15 20:48:16, xiyuan wrote: > On ...
4 years, 10 months ago (2010-07-15 21:52:43 UTC) #6
xiyuan
On 2010/07/15 21:52:43, arv wrote: > http://codereview.chromium.org/2935011/diff/1/3 > File chrome/browser/chromeos/dom_ui/accounts_options_handler.cc (right): > > http://codereview.chromium.org/2935011/diff/1/3#newcode116 > ...
4 years, 10 months ago (2010-07-15 22:17:39 UTC) #7
zel
http://codereview.chromium.org/2935011/diff/16001/17009 File chrome/browser/chromeos/dom_ui/core_options_handler.h (right): http://codereview.chromium.org/2935011/diff/16001/17009#newcode13 chrome/browser/chromeos/dom_ui/core_options_handler.h:13: class CoreOptionsHandler : public ::CoreOptionsHandler { can we rename ...
4 years, 10 months ago (2010-07-15 22:19:35 UTC) #8
xiyuan
- Use JsonToValue and simply parsing logic per arv; - Use better names for chromeos::CoreOptionsHandler ...
4 years, 10 months ago (2010-07-15 22:31:53 UTC) #9
zel
LGTM
4 years, 10 months ago (2010-07-15 22:47:49 UTC) #10
arv
http://codereview.chromium.org/2935011/diff/23001/24021 File chrome/browser/resources/options/chromeos_accounts_user_list.js (right): http://codereview.chromium.org/2935011/diff/23001/24021#newcode110 chrome/browser/resources/options/chromeos_accounts_user_list.js:110: el.user = user; A slightly cleaner solution might be ...
4 years, 10 months ago (2010-07-15 22:48:10 UTC) #11
xiyuan
http://codereview.chromium.org/2935011/diff/23001/24021 File chrome/browser/resources/options/chromeos_accounts_user_list.js (right): http://codereview.chromium.org/2935011/diff/23001/24021#newcode110 chrome/browser/resources/options/chromeos_accounts_user_list.js:110: el.user = user; On 2010/07/15 22:48:10, arv wrote: > ...
4 years, 10 months ago (2010-07-15 23:36:27 UTC) #12
arv
LGTM On 2010/07/15 23:36:27, xiyuan wrote: > http://codereview.chromium.org/2935011/diff/23001/24021 > File chrome/browser/resources/options/chromeos_accounts_user_list.js (right): > > http://codereview.chromium.org/2935011/diff/23001/24021#newcode110 ...
4 years, 10 months ago (2010-07-15 23:55:15 UTC) #13
xiyuan
4 years, 10 months ago (2010-07-16 05:56:48 UTC) #14
inline

On 2010/07/15 23:55:15, arv wrote:
> LGTM
> 
> 
> On 2010/07/15 23:36:27, xiyuan wrote:
> > http://codereview.chromium.org/2935011/diff/23001/24021
> > File chrome/browser/resources/options/chromeos_accounts_user_list.js
(right):
> > 
> > http://codereview.chromium.org/2935011/diff/23001/24021#newcode110
> > chrome/browser/resources/options/chromeos_accounts_user_list.js:110: el.user
=
> > user;
> > On 2010/07/15 22:48:10, arv wrote:
> > > A slightly cleaner solution might be to have a getter and setter for user
> and
> > > set the textContent based on that.
> > > 
> > > function UserListItem(user) {
> > >   var el = cr.doc.createElement('div');
> > >   UserListItem.decorate(el);
> > >   el.user = user;
> > >   return el;
> > > }
> > > 
> > > UserListItem.prototype = {
> > >    __proto__: ListItem.prototype,
> > >    // No need to override decorate any more.
> > >    get user() {
> > >      return this.textContent;
> > >    },
> > >    set user(user) {
> > >      this.textContent = user;
> > >    }
> > > };
> > 
> > Done. I did not implement the getter though.
> 
> If you don't care about reading out the user then I think you might as well
not
> have this class and use ListItem directly.
>

Makes sense. Removed UserListItem and use ListItem directly until we need to
show more than just an email label.
 
> > 
> > http://codereview.chromium.org/2935011/diff/23001/24022
> > File chrome/browser/resources/options/options_page.css (right):
> > 
> > http://codereview.chromium.org/2935011/diff/23001/24022#newcode31
> > chrome/browser/resources/options/options_page.css:31: float: right;
> > On 2010/07/15 22:48:10, arv wrote:
> > > position: absolute;
> > > right: 5px;
> > > top: 5px;
> > > 
> > 
> > Does not look right. This makes the button goes on the boundary of the white
> > rounded frame (#overlayview) and background (#overlay).
> 
> OK.
> 
> > 
> > http://codereview.chromium.org/2935011/diff/23001/24022#newcode37
> > chrome/browser/resources/options/options_page.css:37: z-index: 99999;
> > On 2010/07/15 22:48:10, arv wrote:
> > > Why do you need to set z-index?
> > 
> > Done. It's a brain-dead copy-n-paste from the missing pieces of David's CL.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be