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

Issue 410293004: Split OptionsPage into Page and PageManager (Closed)

Created:
6 years, 5 months ago by michaelpg
Modified:
6 years, 4 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, nkostylev+watch_chromium.org, yukishiino+watch_chromium.org, benquan, Ilya Sherman, yoshiki+watch_chromium.org, dyu1, pam+watch_chromium.org, nona+watch_chromium.org, rginda+watch_chromium.org, yusukes+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, tfarina, mkwst+watchlist_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, stevenjb+watch_chromium.org, rouslan+autofillwatch_chromium.org, Dane Wallinga
Project:
chromium
Visibility:
Public.

Description

Split OptionsPage into Page and PageManager. This is the first step toward consolidating OptionsPage with similar code in HelpBasePage. I know this looks huge, but it's mostly renames -- the only changes that aren't trivial are in: * c/b/resources/options/options_page.js * ui/webui/resources/js/cr/ui/page_helper/page.js * ui/webui/resources/js/cr/ui/page_helper/page_manager.js ========== This CL moves parts of OptionsPage to the new PageManager and Page objects. These changes are essentally renames that shouldn't affect functionality. cr.ui.pageManager.PageManager maintains a list of pages & overlays and can show and hide overlays, scroll around as needed, etc. Basically what the OptionsPage "static" members do for overlays. cr.ui.pageManager.Page is basically the same as the OptionsPage prototype, the essential attributes of each page/overlay. These will be managed by the PageManager. Overlays and root pages like BrowserOptions will now descend from Page. These may not be the best names, and I don't know if cr.ui as at all the best place for these classes -- let me know if you object or have better ideas. Thanks. ========== Future work: * Move some logic back to OptionsPage by way of a handler to make Page and PageManager independent of OptionsPage (e.g., for uber events, history, and so forth) * Transition the About page to use Page and PageManager and remove the old code. * Separate out bubble logic from general page manipulation. ========== R=dbeam@chromium.org,stevenjb@chromium.org, BUG=313244 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286820

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : s/PageTree/PageManager/, s/pageHelper/pageManager/ #

Total comments: 64

Patch Set 4 : Addressed feedback #

Total comments: 43

Patch Set 5 : rebase, feedback, fix for empty title in PageManager #

Total comments: 17

Patch Set 6 : remove unused fn #

Patch Set 7 : rebase correction #

Patch Set 8 : ugh just no #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1548 lines, -2457 lines) Patch
M chrome/browser/resources/chromeos/bluetooth_options.js View 1 2 3 4 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/resources/chromeos/bluetooth_pair_device.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/bluetooth_pair_device.js View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/resources/chromeos/browser_options.js View 1 2 3 4 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/resources/chromeos/certificate_manager_dialog.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/certificate_manager_dialog.js View 1 2 2 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/resources/chromeos/fake_bluetooth_overlay_parent.js View 1 2 3 4 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/resources/chromeos/proxy_settings.html View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/proxy_settings.js View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/options/alert_overlay.js View 1 2 3 4 6 chunks +13 lines, -17 lines 0 comments Download
M chrome/browser/resources/options/autofill_edit_address_overlay.js View 1 2 3 4 4 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/autofill_edit_creditcard_overlay.js View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/autofill_options.js View 1 2 3 4 8 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/resources/options/automatic_settings_reset_banner.js View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 21 chunks +27 lines, -25 lines 0 comments Download
M chrome/browser/resources/options/certificate_backup_overlay.js View 1 2 3 4 4 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/certificate_edit_ca_trust_overlay.js View 1 2 3 4 5 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/resources/options/certificate_import_error_overlay.js View 1 2 3 4 3 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/resources/options/certificate_manager.js View 1 2 3 4 3 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/certificate_restore_overlay.js View 1 2 3 4 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/chromeos/accounts_options.js View 1 2 3 4 5 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/resources/options/chromeos/bluetooth_add_device_overlay.js View 1 2 3 4 3 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/resources/options/chromeos/bluetooth_pair_device_overlay.js View 1 2 3 4 9 chunks +20 lines, -19 lines 0 comments Download
M chrome/browser/resources/options/chromeos/change_picture_options.js View 1 2 3 4 3 chunks +9 lines, -12 lines 0 comments Download
M chrome/browser/resources/options/chromeos/consumer_management_overlay.js View 1 2 3 4 3 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/resources/options/chromeos/display_options.js View 1 2 3 4 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/chromeos/display_overscan.js View 1 2 3 4 5 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/resources/options/chromeos/internet_detail.js View 1 2 3 4 8 chunks +14 lines, -16 lines 0 comments Download
M chrome/browser/resources/options/chromeos/keyboard_overlay.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/options/chromeos/network_list.js View 1 2 3 4 6 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/chromeos/preferred_networks.js View 1 2 3 4 2 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/chromeos/third_party_ime_confirm_overlay.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/clear_browser_data_overlay.js View 1 2 3 4 6 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/resources/options/confirm_dialog.js View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/resources/options/content_settings.js View 1 2 3 4 5 chunks +12 lines, -11 lines 0 comments Download
M chrome/browser/resources/options/content_settings_exceptions_area.js View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/controlled_setting.js View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/options/cookies_view.js View 1 2 3 4 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/factory_reset_overlay.js View 1 2 3 4 3 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/font_settings.js View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/geolocation_options.js View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/resources/options/handler_options.js View 1 2 3 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/home_page_overlay.js View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/resources/options/hotword_confirm_dialog.js View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/hotword_search_setting_indicator.js View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/options/import_data_overlay.js View 1 2 3 4 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/resources/options/language_add_language_overlay.js View 1 2 3 4 1 chunk +9 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/language_dictionary_overlay.js View 1 2 3 4 3 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/language_options.js View 1 2 3 4 8 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/resources/options/manage_profile_overlay.js View 1 2 3 4 17 chunks +28 lines, -28 lines 0 comments Download
M chrome/browser/resources/options/options.html View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/options.js View 1 2 3 4 7 chunks +55 lines, -54 lines 0 comments Download
M chrome/browser/resources/options/options_focus_manager.js View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/options_page.js View 1 2 3 4 1 chunk +64 lines, -977 lines 0 comments Download
M chrome/browser/resources/options/options_settings_app.js View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/password_manager.js View 1 2 3 4 3 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/reset_profile_settings_banner.js View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/reset_profile_settings_overlay.js View 1 2 3 4 3 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/search_engine_manager.js View 1 2 3 4 4 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/resources/options/search_page.js View 1 2 3 4 8 chunks +18 lines, -18 lines 0 comments Download
M chrome/browser/resources/options/settings_dialog.js View 1 2 3 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/startup_overlay.js View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/options/supervised_user_create_confirm.js View 1 2 3 4 2 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/supervised_user_import.js View 1 2 3 4 5 6 5 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/resources/options/supervised_user_learn_more.js View 1 2 3 4 2 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/resources/options/website_settings.js View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/resources/sync_setup_overlay.js View 1 2 3 4 5 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_browsertest.js View 1 2 3 4 15 chunks +42 lines, -42 lines 0 comments Download
M chrome/browser/ui/webui/options/options_browsertest.js View 1 2 3 4 24 chunks +45 lines, -45 lines 0 comments Download
M chrome/browser/ui/webui/sync_setup_browsertest.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + ui/webui/resources/js/cr/ui/page_manager/page.js View 1 2 3 4 5 6 7 9 chunks +94 lines, -824 lines 0 comments Download
A ui/webui/resources/js/cr/ui/page_manager/page_manager.js View 1 2 3 4 5 1 chunk +724 lines, -0 lines 0 comments Download
M ui/webui/resources/webui_resources.grd View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
michaelpg
Dan, could you take a look and let me know if there's anyone else you ...
6 years, 5 months ago (2014-07-24 00:34:33 UTC) #1
michaelpg
6 years, 5 months ago (2014-07-25 22:27:40 UTC) #2
Dan Beam
i think the general idea of moving cross-page functionality into a manager is good, let's ...
6 years, 4 months ago (2014-07-28 20:58:00 UTC) #3
stevenjb
https://chromiumcodereview.appspot.com/410293004/diff/60001/ui/webui/resources/js/cr/ui/page_manager/page.js File ui/webui/resources/js/cr/ui/page_manager/page.js (right): https://chromiumcodereview.appspot.com/410293004/diff/60001/ui/webui/resources/js/cr/ui/page_manager/page.js#newcode9 ui/webui/resources/js/cr/ui/page_manager/page.js:9: * Base class for page. Let's put a better ...
6 years, 4 months ago (2014-07-28 22:27:23 UTC) #4
michaelpg
I've moved some methods around and fixed a bunch of comment/public/private stuff. I don't want ...
6 years, 4 months ago (2014-07-29 01:08:31 UTC) #5
Dan Beam
very close, overall like it https://chromiumcodereview.appspot.com/410293004/diff/60001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js File ui/webui/resources/js/cr/ui/page_manager/page_manager.js (right): https://chromiumcodereview.appspot.com/410293004/diff/60001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js#newcode73 ui/webui/resources/js/cr/ui/page_manager/page_manager.js:73: opt_propertyBag = opt_propertyBag || ...
6 years, 4 months ago (2014-07-30 01:00:03 UTC) #6
michaelpg
Some more cleanup. https://codereview.chromium.org/410293004/diff/100001/chrome/browser/resources/chromeos/bluetooth_pair_device.js File chrome/browser/resources/chromeos/bluetooth_pair_device.js (right): https://codereview.chromium.org/410293004/diff/100001/chrome/browser/resources/chromeos/bluetooth_pair_device.js#newcode49 chrome/browser/resources/chromeos/bluetooth_pair_device.js:49: FakeBluetoothOverlayParent.getInstance()); On 2014/07/30 01:00:01, Dan Beam ...
6 years, 4 months ago (2014-07-30 21:42:20 UTC) #7
stevenjb
lgtm https://codereview.chromium.org/410293004/diff/60001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js File ui/webui/resources/js/cr/ui/page_manager/page_manager.js (right): https://codereview.chromium.org/410293004/diff/60001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js#newcode73 ui/webui/resources/js/cr/ui/page_manager/page_manager.js:73: opt_propertyBag = opt_propertyBag || {}; On 2014/07/30 01:00:01, ...
6 years, 4 months ago (2014-07-30 22:36:22 UTC) #8
Dan Beam
lg to me except for question regarding updateTitle_ https://codereview.chromium.org/410293004/diff/100001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js File ui/webui/resources/js/cr/ui/page_manager/page_manager.js (right): https://codereview.chromium.org/410293004/diff/100001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js#newcode34 ui/webui/resources/js/cr/ui/page_manager/page_manager.js:34: * ...
6 years, 4 months ago (2014-07-31 02:21:33 UTC) #9
michaelpg
Thanks Dan. Responses below. https://codereview.chromium.org/410293004/diff/100001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js File ui/webui/resources/js/cr/ui/page_manager/page_manager.js (right): https://codereview.chromium.org/410293004/diff/100001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js#newcode34 ui/webui/resources/js/cr/ui/page_manager/page_manager.js:34: * @type {Array.Page} On 2014/07/31 ...
6 years, 4 months ago (2014-07-31 03:21:17 UTC) #10
Dan Beam
lgtm https://codereview.chromium.org/410293004/diff/100001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js File ui/webui/resources/js/cr/ui/page_manager/page_manager.js (right): https://codereview.chromium.org/410293004/diff/100001/ui/webui/resources/js/cr/ui/page_manager/page_manager.js#newcode34 ui/webui/resources/js/cr/ui/page_manager/page_manager.js:34: * @type {Array.Page} On 2014/07/31 03:21:16, michaelpg wrote: ...
6 years, 4 months ago (2014-07-31 03:30:38 UTC) #11
michaelpg
rebase, remove unused code
6 years, 4 months ago (2014-07-31 03:51:22 UTC) #12
michaelpg
The CQ bit was checked by michaelpg@chromium.org
6 years, 4 months ago (2014-07-31 03:51:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaelpg@chromium.org/410293004/220001
6 years, 4 months ago (2014-07-31 03:55:48 UTC) #14
michaelpg
On 2014/07/31 03:55:48, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 4 months ago (2014-07-31 04:17:57 UTC) #15
michaelpg
The CQ bit was unchecked by michaelpg@chromium.org
6 years, 4 months ago (2014-07-31 05:11:40 UTC) #16
michaelpg
rebase correction
6 years, 4 months ago (2014-07-31 05:38:20 UTC) #17
michaelpg
The CQ bit was checked by michaelpg@chromium.org
6 years, 4 months ago (2014-07-31 05:38:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaelpg@chromium.org/410293004/240001
6 years, 4 months ago (2014-07-31 05:41:08 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium.linux ...
6 years, 4 months ago (2014-07-31 11:21:34 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-31 11:25:37 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/1211)
6 years, 4 months ago (2014-07-31 11:25:39 UTC) #22
michaelpg
The CQ bit was checked by michaelpg@chromium.org
6 years, 4 months ago (2014-07-31 12:41:32 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/michaelpg@chromium.org/410293004/260001
6 years, 4 months ago (2014-07-31 12:44:32 UTC) #24
commit-bot: I haz the power
6 years, 4 months ago (2014-07-31 16:46:19 UTC) #25
Message was sent while issue was closed.
Change committed as 286820

Powered by Google App Engine
This is Rietveld 408576698