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

Issue 944183002: HostTableEntry refactor (Closed)

Created:
5 years, 10 months ago by kelvinp
Modified:
5 years, 9 months ago
Reviewers:
Jamie
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

HostTableEntry refactor The HostTableEntry is currently shared between the local host section and the host list. However, they have slightly different creation behavior. For one, the DOM is generated on the fly for the HostList whereas the local host section has its DOM hard coded in the ui_me2me.html. In addition, the existing HostTableEntry expects the host to be passed in during construction time. This is slightly awkward for the LocalHostSection as the host is null until the local host has started. After the refactoring, the HostTableEntry generates the DOM in its constructor. The host is passed in via the setHost() function that updates the DOM using querySelector and innerText. The refactor also combines updateStatus() and setHostName() into once single function updateUI() that refreshes the UI based on the underlying state (the host). This CL also separates the local host section in the hostlist into its own class. BUG=461539 Committed: https://crrev.com/f95677ac2cfa32589e20bd93be2f5320b39e31ad Cr-Commit-Position: refs/heads/master@{#319038}

Patch Set 1 #

Total comments: 17

Patch Set 2 : Reviewer's feedbacks with unit tests #

Total comments: 34

Patch Set 3 : Rebase + Merge with Gary's change #

Patch Set 4 : Reviewer's feedback (Jamie) #

Patch Set 5 : Update browser tests #

Total comments: 2

Patch Set 6 : Address Jamie's feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+706 lines, -439 lines) Patch
M chrome/test/remoting/remote_desktop_browsertest.cc View 1 2 3 4 2 chunks +7 lines, -6 lines 0 comments Download
M remoting/remoting_webapp_files.gypi View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M remoting/webapp/base/html/main.css View 1 2 3 4 3 chunks +12 lines, -2 lines 0 comments Download
M remoting/webapp/base/js/base.js View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M remoting/webapp/browser_test/browser_test.js View 1 2 3 3 chunks +7 lines, -4 lines 0 comments Download
M remoting/webapp/browser_test/update_pin_browser_test.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M remoting/webapp/crd/html/ui_me2me.html View 1 2 3 2 chunks +5 lines, -18 lines 0 comments Download
M remoting/webapp/crd/js/crd_event_handlers.js View 1 2 2 chunks +1 line, -11 lines 0 comments Download
M remoting/webapp/crd/js/crd_main.js View 1 2 3 2 chunks +1 line, -3 lines 0 comments Download
M remoting/webapp/crd/js/host_list.js View 1 2 3 8 chunks +22 lines, -98 lines 0 comments Download
M remoting/webapp/crd/js/host_table_entry.js View 1 2 3 4 5 3 chunks +244 lines, -291 lines 0 comments Download
A remoting/webapp/crd/js/local_host_section.js View 1 2 3 4 5 1 chunk +151 lines, -0 lines 0 comments Download
M remoting/webapp/js_proto/qunit_proto.js View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M remoting/webapp/js_proto/sinon_proto.js View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M remoting/webapp/js_proto/sinon_stub_proto.js View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A remoting/webapp/unittests/host_table_entry_unittest.js View 1 2 3 1 chunk +212 lines, -0 lines 0 comments Download
M remoting/webapp/unittests/sinon_helpers.js View 1 2 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
kelvinp
PTAL. Hey Jamie, I did this refactor as a ground work for improving the UI ...
5 years, 10 months ago (2015-02-20 23:48:44 UTC) #2
Jamie
Please proceed. I like the direction this is going in. https://codereview.chromium.org/944183002/diff/1/remoting/webapp/crd/html/ui_me2me.html File remoting/webapp/crd/html/ui_me2me.html (right): https://codereview.chromium.org/944183002/diff/1/remoting/webapp/crd/html/ui_me2me.html#newcode68 ...
5 years, 10 months ago (2015-02-23 22:28:12 UTC) #3
kelvinp
PTAL https://codereview.chromium.org/944183002/diff/1/remoting/webapp/crd/html/ui_me2me.html File remoting/webapp/crd/html/ui_me2me.html (right): https://codereview.chromium.org/944183002/diff/1/remoting/webapp/crd/html/ui_me2me.html#newcode68 remoting/webapp/crd/html/ui_me2me.html:68: <div class='local-host-info'></div> On 2015/02/23 22:28:11, Jamie wrote: > ...
5 years, 10 months ago (2015-02-24 22:04:45 UTC) #4
kelvinp
Ping
5 years, 10 months ago (2015-02-26 23:15:15 UTC) #6
Jamie
https://codereview.chromium.org/944183002/diff/1/remoting/webapp/crd/js/local_host_section.js File remoting/webapp/crd/js/local_host_section.js (right): https://codereview.chromium.org/944183002/diff/1/remoting/webapp/crd/js/local_host_section.js#newcode27 remoting/webapp/crd/js/local_host_section.js:27: var webappVersion = parseInt(chrome.runtime.getManifest().version, 10); On 2015/02/24 22:04:45, kelvinp ...
5 years, 9 months ago (2015-02-27 18:19:41 UTC) #7
kelvinp
PTAL Sorry about the rebasing, my change will no longer compile will Gary's JSCompile change. ...
5 years, 9 months ago (2015-03-03 21:57:54 UTC) #12
Jamie
Mostly looks good. https://codereview.chromium.org/944183002/diff/40001/remoting/webapp/crd/js/host_list.js File remoting/webapp/crd/js/host_list.js (right): https://codereview.chromium.org/944183002/diff/40001/remoting/webapp/crd/js/host_list.js#newcode80 remoting/webapp/crd/js/host_list.js:80: new remoting.LocalHostSection.Controller(this)); On 2015/03/03 21:57:52, kelvinp ...
5 years, 9 months ago (2015-03-04 00:09:25 UTC) #13
kelvinp
PTAL https://codereview.chromium.org/944183002/diff/40001/remoting/webapp/crd/js/host_list.js File remoting/webapp/crd/js/host_list.js (right): https://codereview.chromium.org/944183002/diff/40001/remoting/webapp/crd/js/host_list.js#newcode80 remoting/webapp/crd/js/host_list.js:80: new remoting.LocalHostSection.Controller(this)); On 2015/03/04 00:09:24, Jamie wrote: > ...
5 years, 9 months ago (2015-03-04 02:02:28 UTC) #14
Jamie
lgtm
5 years, 9 months ago (2015-03-04 02:45:44 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/944183002/200001
5 years, 9 months ago (2015-03-04 07:06:00 UTC) #17
commit-bot: I haz the power
Committed patchset #6 (id:200001)
5 years, 9 months ago (2015-03-04 08:58:05 UTC) #18
commit-bot: I haz the power
5 years, 9 months ago (2015-03-04 08:58:54 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f95677ac2cfa32589e20bd93be2f5320b39e31ad
Cr-Commit-Position: refs/heads/master@{#319038}

Powered by Google App Engine
This is Rietveld 408576698