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

Issue 1985223003: Factor stuff from ApplicationImpl out to a new class, ApplicationImplBase. (Closed)

Created:
4 years, 7 months ago by viettrungluu
Modified:
4 years, 7 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, yzshen+mojopublicwatch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@work790_app_test_base_no_app_impl
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Factor stuff from ApplicationImpl out to a new class, ApplicationImplBase. ApplicationImpl is now a rather dumb class that just calls its ApplicationDelegate. Using base/implementation classes is preferable to the delegate pattern because: * It's simpler (see below). * With the delgate pattern, the impl and the delegate both need pointers to each other. And so there are lifetime problems/considerations. * The delegate just ends up calling into the impl a lot. Unfortunately, it's rather hard (impossible) to use ApplicationImplBase right now (as intended): I'll need to refactor ApplicationRunner(Chromium) to not just instantiate ApplicationImpl, etc. (I'll also need a story for the crazy that is ApplicationImpl(Base)::Terminate().) R=vardhan@google.com Committed: https://chromium.googlesource.com/external/mojo/+/0a68a8d847fc6f6fd3c494992c4ab6bd60bddcb6

Patch Set 1 #

Patch Set 2 : fix android #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -102 lines) Patch
M examples/bank_app/customer.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M mojo/application/application_runner_chromium.cc View 1 chunk +2 lines, -1 line 0 comments Download
M mojo/public/cpp/application/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/application/application_impl.h View 3 chunks +8 lines, -38 lines 0 comments Download
A mojo/public/cpp/application/application_impl_base.h View 1 chunk +98 lines, -0 lines 0 comments Download
M mojo/public/cpp/application/lib/application_impl.cc View 1 chunk +6 lines, -43 lines 0 comments Download
A + mojo/public/cpp/application/lib/application_impl_base.cc View 2 chunks +17 lines, -19 lines 0 comments Download
M mojo/public/cpp/application/lib/application_runner.cc View 2 chunks +2 lines, -1 line 2 comments Download
M mojo/ui/view_provider_app.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/nacl/nonsfi/content_handler_main_nexe.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/nacl/nonsfi/content_handler_main_pexe.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/notifications/apptests/notifications_apptest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 7 (2 generated)
viettrungluu
Depends on https://codereview.chromium.org/1990603002/.
4 years, 7 months ago (2016-05-17 22:31:15 UTC) #1
viettrungluu
On 2016/05/17 22:31:15, viettrungluu wrote: > Depends on https://codereview.chromium.org/1990603002/. D'oh, must fix android. Also, I ...
4 years, 7 months ago (2016-05-17 22:34:04 UTC) #2
vardhan
lgtm https://codereview.chromium.org/1985223003/diff/20001/mojo/public/cpp/application/lib/application_runner.cc File mojo/public/cpp/application/lib/application_runner.cc (right): https://codereview.chromium.org/1985223003/diff/20001/mojo/public/cpp/application/lib/application_runner.cc#newcode20 mojo/public/cpp/application/lib/application_runner.cc:20: void ApplicationImplBase::Terminate() { feels weird that this is ...
4 years, 7 months ago (2016-05-17 23:36:53 UTC) #4
viettrungluu
https://codereview.chromium.org/1985223003/diff/20001/mojo/public/cpp/application/lib/application_runner.cc File mojo/public/cpp/application/lib/application_runner.cc (right): https://codereview.chromium.org/1985223003/diff/20001/mojo/public/cpp/application/lib/application_runner.cc#newcode20 mojo/public/cpp/application/lib/application_runner.cc:20: void ApplicationImplBase::Terminate() { On 2016/05/17 23:36:52, vardhan wrote: > ...
4 years, 7 months ago (2016-05-17 23:42:50 UTC) #5
viettrungluu
4 years, 7 months ago (2016-05-17 23:43:21 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
0a68a8d847fc6f6fd3c494992c4ab6bd60bddcb6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698