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

Issue 1195493002: Refactor Navigator to put state in separate class, initial back button plumbing (Closed)

Created:
5 years, 6 months ago by jackson
Modified:
5 years, 6 months ago
Reviewers:
abarth-chromium, Hixie
CC:
abarth-chromium, gregsimon, jackson_old, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Refactor Navigator to put state in separate class, initial back button plumbing R=abarth@chromium.org, abarth Committed: https://chromium.googlesource.com/external/mojo/+/e3ee7195a7314edd369d89f671a3ab18823fe4a0

Patch Set 1 #

Total comments: 1

Patch Set 2 : abarth CR feedback #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -43 lines) Patch
M sky/examples/stocks2/lib/stock_app.dart View 1 chunk +17 lines, -12 lines 0 comments Download
M sky/examples/widgets/navigation.dart View 1 chunk +3 lines, -1 line 0 comments Download
M sky/sdk/lib/app/view.dart View 1 2 chunks +6 lines, -0 lines 1 comment Download
M sky/sdk/lib/widgets/navigator.dart View 2 chunks +54 lines, -30 lines 0 comments Download
M sky/sdk/lib/widgets/widget.dart View 1 chunk +7 lines, -0 lines 1 comment Download

Messages

Total messages: 5 (1 generated)
jackson
5 years, 6 months ago (2015-06-17 18:30:33 UTC) #1
abarth-chromium
lgtm https://codereview.chromium.org/1195493002/diff/1/sky/sdk/lib/app/view.dart File sky/sdk/lib/app/view.dart (right): https://codereview.chromium.org/1195493002/diff/1/sky/sdk/lib/app/view.dart#newcode18 sky/sdk/lib/app/view.dart:18: typedef void EventListener(sky.Event event); You should already have ...
5 years, 6 months ago (2015-06-17 18:55:20 UTC) #2
jackson
Committed patchset #2 (id:20001) manually as e3ee7195a7314edd369d89f671a3ab18823fe4a0 (presubmit successful).
5 years, 6 months ago (2015-06-17 19:21:15 UTC) #3
Hixie
5 years, 6 months ago (2015-06-17 19:29:43 UTC) #5
Message was sent while issue was closed.
lgtm

https://codereview.chromium.org/1195493002/diff/20001/sky/sdk/lib/app/view.dart
File sky/sdk/lib/app/view.dart (right):

https://codereview.chromium.org/1195493002/diff/20001/sky/sdk/lib/app/view.da...
sky/sdk/lib/app/view.dart:53: List<sky.EventListener> eventListeners = new
List<sky.EventListener>();
Make this final, at least.

But ideally, we'd have an interface here where you can add (and remove)
listeners. Otherwise, random people can clear the list, send events to random
callbacks, etc.

Also, we shouldn't use sky.EventListener. Just use a typedef for a callback.

https://codereview.chromium.org/1195493002/diff/20001/sky/sdk/lib/widgets/wid...
File sky/sdk/lib/widgets/widget.dart (right):

https://codereview.chromium.org/1195493002/diff/20001/sky/sdk/lib/widgets/wid...
sky/sdk/lib/widgets/widget.dart:802:
WidgetAppView._appView.eventListeners.add((event) {
This shouldn't use the underbar version. If there's no way to get to the appview
from here without using privates, then we have a bigger problem.

Powered by Google App Engine
This is Rietveld 408576698