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

Issue 2781005: Option dialog DOM UI - ChromeOS System page. (Closed)

Created:
10 years, 6 months ago by zel
Modified:
9 years, 6 months ago
CC:
chromium-reviews, ben+cc_chromium.org, stuartmorgan
Visibility:
Public.

Description

Basic code structures for rewritten options dialogs as DOM UI. Also includes the initial implementation of System page in ChromeOS options. BUG=chromium-os: TEST=none yet, work in progress Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50117

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 23

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 35

Patch Set 5 : '' #

Total comments: 20

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 30
Unified diffs Side-by-side diffs Delta from patch set Stats (+943 lines, -18 lines) Patch
M chrome/browser/browser_resources.grd View 1 2 3 4 1 chunk +6 lines, -5 lines 0 comments Download
A chrome/browser/chromeos/dom_ui/system_options_handler.h View 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/dom_ui/system_options_handler.cc View 2 3 4 5 6 1 chunk +139 lines, -0 lines 0 comments Download
A chrome/browser/dom_ui/core_options_handler.h View 2 3 4 1 chunk +53 lines, -0 lines 0 comments Download
A chrome/browser/dom_ui/core_options_handler.cc View 2 3 4 5 1 chunk +213 lines, -0 lines 0 comments Download
M chrome/browser/dom_ui/dom_ui_factory.cc View 1 2 3 4 3 chunks +8 lines, -3 lines 0 comments Download
A chrome/browser/dom_ui/options_ui.h View 1 2 3 4 5 6 7 1 chunk +83 lines, -0 lines 0 comments Download
A chrome/browser/dom_ui/options_ui.cc View 1 2 3 4 1 chunk +124 lines, -0 lines 1 comment Download
A chrome/browser/resources/options.html View 1 2 3 4 5 6 7 1 chunk +258 lines, -0 lines 29 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 3 chunks +7 lines, -1 line 0 comments Download
M chrome/common/url_constants.h View 1 2 3 4 5 2 chunks +11 lines, -9 lines 0 comments Download
M chrome/common/url_constants.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
zel
The first cut of the actual DOM UI implementation. HTML+JS still needs *tons* of improvements ...
10 years, 6 months ago (2010-06-16 17:31:59 UTC) #1
Ben Goodger (Google)
One general comment I would like to make is that I would like to not ...
10 years, 6 months ago (2010-06-16 18:09:34 UTC) #2
zel
I have removed browser.h include from options_ui.cc since it really wasn't used. Is there anything ...
10 years, 6 months ago (2010-06-16 18:29:27 UTC) #3
James Hawkins
http://codereview.chromium.org/2781005/diff/7001/8004 File chrome/browser/dom_ui/core_options_handler.cc (right): http://codereview.chromium.org/2781005/diff/7001/8004#newcode28 chrome/browser/dom_ui/core_options_handler.cc:28: CHECK(localized_strings); Do we have a need for CHECK over ...
10 years, 6 months ago (2010-06-16 18:36:58 UTC) #4
Ben Goodger (Google)
Nope that's it... If you find yourself needing to use Browser for some reason it'd ...
10 years, 6 months ago (2010-06-16 19:24:17 UTC) #5
Evan Stade
mostly lgtm, just nits http://codereview.chromium.org/2781005/diff/30001/29003 File chrome/browser/chromeos/dom_ui/system_options_handler.cc (right): http://codereview.chromium.org/2781005/diff/30001/29003#newcode33 chrome/browser/chromeos/dom_ui/system_options_handler.cc:33: icu::UnicodeString::fromUTF8("Pacific/Samoa"))); can you create a ...
10 years, 6 months ago (2010-06-16 20:03:43 UTC) #6
csilv
http://codereview.chromium.org/2781005/diff/30001/29007 File chrome/browser/dom_ui/dom_ui_factory.cc (right): http://codereview.chromium.org/2781005/diff/30001/29007#newcode28 chrome/browser/dom_ui/dom_ui_factory.cc:28: #include "chrome/browser/dom_ui/options_ui.h" options_ui should be pulled out of this ...
10 years, 6 months ago (2010-06-16 20:54:58 UTC) #7
James Hawkins
On 2010/06/16 20:54:58, Chris Silverberg wrote: > http://codereview.chromium.org/2781005/diff/30001/29007 > File chrome/browser/dom_ui/dom_ui_factory.cc (right): > > http://codereview.chromium.org/2781005/diff/30001/29007#newcode28 ...
10 years, 6 months ago (2010-06-16 20:56:22 UTC) #8
csilv
gotcha. will do.
10 years, 6 months ago (2010-06-16 20:58:36 UTC) #9
zel
http://codereview.chromium.org/2781005/diff/7001/8004 File chrome/browser/dom_ui/core_options_handler.cc (right): http://codereview.chromium.org/2781005/diff/7001/8004#newcode28 chrome/browser/dom_ui/core_options_handler.cc:28: CHECK(localized_strings); On 2010/06/16 18:36:58, James Hawkins wrote: > Do ...
10 years, 6 months ago (2010-06-16 22:00:15 UTC) #10
James Hawkins
Sorry I missed the ScopedVector the first time. http://codereview.chromium.org/2781005/diff/7001/8004 File chrome/browser/dom_ui/core_options_handler.cc (right): http://codereview.chromium.org/2781005/diff/7001/8004#newcode103 chrome/browser/dom_ui/core_options_handler.cc:103: std::wstring ...
10 years, 6 months ago (2010-06-16 22:09:44 UTC) #11
Evan Stade
http://codereview.chromium.org/2781005/diff/30001/29004 File chrome/browser/chromeos/dom_ui/system_options_handler.h (right): http://codereview.chromium.org/2781005/diff/30001/29004#newcode28 chrome/browser/chromeos/dom_ui/system_options_handler.h:28: std::wstring GetTimezoneID(const icu::TimeZone* timezone); There is almost never a ...
10 years, 6 months ago (2010-06-16 22:30:59 UTC) #12
dhg
drive by http://codereview.chromium.org/2781005/diff/44001/45009 File chrome/browser/resources/options.html (right): http://codereview.chromium.org/2781005/diff/44001/45009#newcode16 chrome/browser/resources/options.html:16: return eval("dict."+name) semicolon? http://codereview.chromium.org/2781005/diff/44001/45009#newcode52 chrome/browser/resources/options.html:52: nav.class = ...
10 years, 6 months ago (2010-06-16 23:24:00 UTC) #13
zel
http://codereview.chromium.org/2781005/diff/30001/29004 File chrome/browser/chromeos/dom_ui/system_options_handler.h (right): http://codereview.chromium.org/2781005/diff/30001/29004#newcode28 chrome/browser/chromeos/dom_ui/system_options_handler.h:28: std::wstring GetTimezoneID(const icu::TimeZone* timezone); On 2010/06/16 22:30:59, Evan Stade ...
10 years, 6 months ago (2010-06-16 23:37:19 UTC) #14
Evan Stade
LGTM! http://codereview.chromium.org/2781005/diff/30001/29005 File chrome/browser/dom_ui/core_options_handler.cc (right): http://codereview.chromium.org/2781005/diff/30001/29005#newcode181 chrome/browser/dom_ui/core_options_handler.cc:181: wcstol(value_string.c_str(), NULL, 10)); On 2010/06/16 23:37:20, zel wrote: ...
10 years, 6 months ago (2010-06-16 23:44:59 UTC) #15
zel
http://codereview.chromium.org/2781005/diff/44001/45009 File chrome/browser/resources/options.html (right): http://codereview.chromium.org/2781005/diff/44001/45009#newcode16 chrome/browser/resources/options.html:16: return eval("dict."+name) On 2010/06/16 23:24:01, dhg wrote: > semicolon? ...
10 years, 6 months ago (2010-06-17 03:39:13 UTC) #16
dhg
javascript LGTM On Wed, Jun 16, 2010 at 8:39 PM, <zelidrag@chromium.org> wrote: > > http://codereview.chromium.org/2781005/diff/44001/45009 ...
10 years, 6 months ago (2010-06-17 04:44:11 UTC) #17
arv (Not doing code reviews)
http://codereview.chromium.org/2781005/diff/39003/10010 File chrome/browser/dom_ui/options_ui.cc (right): http://codereview.chromium.org/2781005/diff/39003/10010#newcode93 chrome/browser/dom_ui/options_ui.cc:93: // OptionsUIContents OptionsUI http://codereview.chromium.org/2781005/diff/39003/10012 File chrome/browser/resources/options.html (right): http://codereview.chromium.org/2781005/diff/39003/10012#newcode16 chrome/browser/resources/options.html:16: ...
10 years, 6 months ago (2010-06-17 22:53:17 UTC) #18
zel
10 years, 6 months ago (2010-06-18 02:07:05 UTC) #19
arv, the changes from your review ended up in my new CL at:

http://codereview.chromium.org/2835009

http://codereview.chromium.org/2781005/diff/39003/10012
File chrome/browser/resources/options.html (right):

http://codereview.chromium.org/2781005/diff/39003/10012#newcode16
chrome/browser/resources/options.html:16: return eval('dict.'+name);
On 2010/06/17 22:53:18, arv wrote:
> Do not use eval
> 
> return dict[name];

dict[name] actually does not work. Something funny happens with dict while it is
constructed on C++ side, key values like "one.two.three" end up converted into
something like

dict = { one : { two: { three : 'some value' } } };

that's why I ended up using eval in the first place.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode45
chrome/browser/resources/options.html:45: var page = $(name+'Page');
On 2010/06/17 22:53:18, arv wrote:
> ws around binops

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode48
chrome/browser/resources/options.html:48: nav.class = 'navbar_item
navbar_item_selected';
On 2010/06/17 22:53:18, arv wrote:
> use dashes (-) for css class names and ids

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode65
chrome/browser/resources/options.html:65: chrome.send("fetchPrefs",
['systemPrefsFetched', '',
On 2010/06/17 22:53:18, arv wrote:
> Use single quotes in JS for consistence.

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode75
chrome/browser/resources/options.html:75: timezoneSel = $('timezoneSel');
On 2010/06/17 22:53:18, arv wrote:
> missing var

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode79
chrome/browser/resources/options.html:79: new
Option(templateData.timezoneMap[key], key, false, selected);
On 2010/06/17 22:53:18, arv wrote:
> or
> 
> timezoneSel.appendChild(new Option(...));

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode99
chrome/browser/resources/options.html:99: if (control.id == 'tapToClickChk') {
On 2010/06/17 22:53:18, arv wrote:
> Use a switch

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode129
chrome/browser/resources/options.html:129: .navbar_container {
On 2010/06/17 22:53:18, arv wrote:
> Put an empty line between each rule

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode132
chrome/browser/resources/options.html:132: cursor:pointer;
On 2010/06/17 22:53:18, arv wrote:
> ws after :

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode134
chrome/browser/resources/options.html:134: float:left;
On 2010/06/17 22:53:18, arv wrote:
> rtl?

Not sure I get this one.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode178
chrome/browser/resources/options.html:178: <body onload="load();"
i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
On 2010/06/17 22:53:18, arv wrote:
> Long line

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode184
chrome/browser/resources/options.html:184: <li class="navbar_item
navbar_item_normal" id="systemPageNav" i18n-values=".innerText:systemPage"></li>
On 2010/06/17 22:53:18, arv wrote:
> Use i18n-content="systemPage"

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode184
chrome/browser/resources/options.html:184: <li class="navbar_item
navbar_item_normal" id="systemPageNav" i18n-values=".innerText:systemPage"></li>
On 2010/06/17 22:53:18, arv wrote:
> Use i18n-content="systemPage"

Done.

http://codereview.chromium.org/2781005/diff/39003/10012#newcode216
chrome/browser/resources/options.html:216: <input id="sensitivityRng"
type="range" min="1" max="10" class="touchSlider"
style="-webkit-appearance:slider-horizontal;" onchange="rangeChanged(this)">
On 2010/06/17 22:53:18, arv wrote:
> move css to the style element
> 
> I don't see why you need to set the appearance here.

Done.

Powered by Google App Engine
This is Rietveld 408576698