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

Issue 878933005: Remove NativeViewportClient (Closed)

Created:
5 years, 10 months ago by jamesr
Modified:
5 years, 10 months ago
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, eseidel
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Remove NativeViewportClient This removes the client interface from NativeViewport. This interface had two methods, OnDestroyed and OnMetricsChanged. OnDestroyed is redundant with just closing the message pipe. OnMetricsChanged is more interesting. Since there's no rate limiting in this interface, an unbounded number of metrics updates could accumulate in this pipe. Since users of the NativeViewport service will (generally) only care about the most recent update this replaces the pipe with a request->callback pair NativeViewport.RequestMetrics. The reply message to this is sent whenever the metrics change. Callers have been updated to either use the metrics from the initial creation callback (for samples that do not handle resize) or continually call RequestMetrics if they wish to track size / scale changes. This way only one request is pending per connection. BUG=451319 R=sky@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/91b812b1af824c8faba2f75d88d31a1532164728

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -190 lines) Patch
M examples/sample_app/sample_app.cc View 4 chunks +22 lines, -19 lines 1 comment Download
M examples/surfaces_app/surfaces_app.cc View 4 chunks +4 lines, -10 lines 0 comments Download
M mojo/services/native_viewport/public/interfaces/native_viewport.mojom View 2 chunks +3 lines, -9 lines 1 comment Download
M services/native_viewport/main.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/native_viewport/native_viewport_impl.h View 3 chunks +25 lines, -8 lines 0 comments Download
M services/native_viewport/native_viewport_impl.cc View 5 chunks +35 lines, -17 lines 0 comments Download
D services/native_viewport/platform_viewport_win.cc View 1 chunk +0 lines, -107 lines 0 comments Download
M services/surfaces/surfaces_impl.h View 1 chunk +0 lines, -2 lines 0 comments Download
M services/view_manager/display_manager.h View 2 chunks +8 lines, -6 lines 0 comments Download
M services/view_manager/display_manager.cc View 5 chunks +13 lines, -9 lines 0 comments Download
M shell/android/native_viewport_application_loader.cc View 1 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
jamesr
5 years, 10 months ago (2015-01-27 23:48:55 UTC) #2
jamesr
5 years, 10 months ago (2015-01-28 00:45:26 UTC) #4
jamesr
FYI Eric - this touches some files that https://codereview.chromium.org/880743002/ touches. I don't think it really ...
5 years, 10 months ago (2015-01-28 00:52:33 UTC) #5
sky
https://codereview.chromium.org/878933005/diff/20001/mojo/services/native_viewport/public/interfaces/native_viewport.mojom File mojo/services/native_viewport/public/interfaces/native_viewport.mojom (right): https://codereview.chromium.org/878933005/diff/20001/mojo/services/native_viewport/public/interfaces/native_viewport.mojom#newcode22 mojo/services/native_viewport/public/interfaces/native_viewport.mojom:22: RequestMetrics() => (ViewportMetrics metrics); With this model how would ...
5 years, 10 months ago (2015-01-28 19:17:33 UTC) #6
sky
James clarified how this works in person. LGTM https://codereview.chromium.org/878933005/diff/20001/examples/sample_app/sample_app.cc File examples/sample_app/sample_app.cc (right): https://codereview.chromium.org/878933005/diff/20001/examples/sample_app/sample_app.cc#newcode58 examples/sample_app/sample_app.cc:58: base::Bind(&SampleApp::OnMetricsChanged, ...
5 years, 10 months ago (2015-01-28 19:26:41 UTC) #7
jamesr
Added a comment and removed the unnecessary WeakPtrFactory from sample_app.
5 years, 10 months ago (2015-01-28 21:32:58 UTC) #8
jamesr
5 years, 10 months ago (2015-01-29 01:13:59 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
91b812b1af824c8faba2f75d88d31a1532164728 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698