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

Issue 911073005: Drop all uses of //base except ObserverList from view mgr client lib (Closed)

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

Description

Drop all uses of //base except ObserverList from view mgr client lib This removes all uses of //base from the view manager client C++ library interface and implementation except for ObserverList. The tests still use //base fairly extensively to set up message loops and whatnot. Main changes: *) use int64_t + <stdint.h> instead of //base/basictypes.h + int64. This is what //base/basictypes.h recommends doing anyway *) use lambdas to construct callbacks instead of base::Bind. We were using base::Unretained() anyway so bind's lifetime stuff didn't help us. *) Hand-expand the one use of DISALLOW_COPY_AND_ASSIGN *) Remove the one used of scoped_ptr in the ViewManagerClientFactory variant used by the window manager. This one is a bit unfortunate in that it needs a raw pointer but we should be able to update it to std::unique_ptr<> relatively soon and it's only used in two places (the window manager common lib and one test). The ObserverList dependency is a bit bigger. R=sky@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/3aefd1bccae360f76b91162edb8de8698e34e98b

Patch Set 1 #

Total comments: 2

Patch Set 2 : MOJO_DISALLOW #

Patch Set 3 : gn check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -130 lines) Patch
M mojo/services/view_manager/public/cpp/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_manager_client_factory.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h View 1 4 chunks +5 lines, -17 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.cc View 1 5 chunks +17 lines, -34 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_manager_context.cc View 1 chunk +3 lines, -1 line 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_observer.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M mojo/services/view_manager/public/cpp/lib/view_private.h View 1 2 chunks +1 line, -3 lines 0 comments Download
M mojo/services/view_manager/public/cpp/tests/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/view_manager/public/cpp/tests/view_manager_test_suite.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M mojo/services/view_manager/public/cpp/tests/view_manager_unittest.cc View 1 10 chunks +10 lines, -9 lines 0 comments Download
M mojo/services/view_manager/public/cpp/tests/view_unittest.cc View 1 8 chunks +8 lines, -8 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view.h View 1 4 chunks +12 lines, -10 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view_manager_client_factory.h View 2 chunks +3 lines, -3 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view_manager_context.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view_observer.h View 1 chunk +0 lines, -2 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view_property.h View 4 chunks +20 lines, -20 lines 0 comments Download
M mojo/services/view_manager/public/cpp/view_tracker.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M services/window_manager/window_manager_app.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
jamesr
5 years, 10 months ago (2015-02-10 22:31:35 UTC) #1
viettrungluu
FWIW, you can use MOJO_DISALLOW_COPY_AND_ASSIGN if you want. (And I think you missed various DISALLOW_COPY_AND_ASSIGNs.) ...
5 years, 10 months ago (2015-02-10 22:47:11 UTC) #3
jamesr
Ah, that's nicer. That macro must be defined through other includes.
5 years, 10 months ago (2015-02-10 22:48:36 UTC) #4
sky
LGTM https://codereview.chromium.org/911073005/diff/1/mojo/services/view_manager/public/cpp/view_tracker.h File mojo/services/view_manager/public/cpp/view_tracker.h (right): https://codereview.chromium.org/911073005/diff/1/mojo/services/view_manager/public/cpp/view_tracker.h#newcode42 mojo/services/view_manager/public/cpp/view_tracker.h:42: ViewTracker(const ViewTracker&); MOJO_DISALLOW_COPY_AND_ASSIGN?
5 years, 10 months ago (2015-02-10 22:51:15 UTC) #5
jamesr
5 years, 10 months ago (2015-02-11 01:11:50 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
3aefd1bccae360f76b91162edb8de8698e34e98b.

Powered by Google App Engine
This is Rietveld 408576698