Instead of the remote view thing it uses now
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d7f83e3f1b630de8829cc11fb898a53bcf887cc3 commit d7f83e3f1b630de8829cc11fb898a53bcf887cc3 Author: Ken Rockot <rockot@chromium.org> Date: Mon Sep 17 23:36:30 2018 [content-service] Add features needed for app_list This CL: - Introduces a NavigableContentsObserver client API - Allows auto-resize to be configured for a NavigableContents - Allows observation of navigation completion and auto-resize events, also allowing response headers to be inspected on navigation completion. - Allows a navigation to be configured to clear the session history With these changes in place it's possible to use NavigableContents for the Chrome OS app_list's Answer Card search results, for both in- and out-of-process Ash. Bug: 854367 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: I1827b7b6af5b518739d662659c29b06db8a959db Reviewed-on: https://chromium-review.googlesource.com/1212023 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Eric Roman <eroman@chromium.org> Reviewed-by: Camille Lamy <clamy@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#591876} [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/content/browser/content_service_browsertest.cc [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/content/browser/content_service_delegate_impl.cc [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/content/browser/content_service_delegate_impl.h [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/DEPS [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/navigable_contents_delegate.h [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/navigable_contents_impl.cc [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/navigable_contents_impl.h [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/cpp/BUILD.gn [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/cpp/DEPS [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/cpp/navigable_contents.cc [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/cpp/navigable_contents.h [add] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/cpp/navigable_contents_observer.h [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/mojom/BUILD.gn [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/mojom/navigable_contents.mojom [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/public/mojom/navigable_contents_factory.mojom [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/service_delegate.h [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/content/service_unittest.cc [modify] https://crrev.com/d7f83e3f1b630de8829cc11fb898a53bcf887cc3/services/network/public/cpp/network_param.typemap
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5b09ac35a71c52b974ef4e40ebf2b492f54a3517 commit 5b09ac35a71c52b974ef4e40ebf2b492f54a3517 Author: Ken Rockot <rockot@chromium.org> Date: Wed Sep 19 18:01:51 2018 [content-service] Tolerate null response headers Updates Content Service mojom and implementation to tolerate null response headers on navigation completion events. This diff was meant to be part of https://chromium-review.googlesource.com/c/chromium/src/+/1212023 but its boneheaded author failed to upload a new patchset. Bug: 854367 Change-Id: I908badb9103a9da5d5d91ae95019689b286b4ee6 Reviewed-on: https://chromium-review.googlesource.com/1231159 Reviewed-by: Camille Lamy <clamy@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#592468} [modify] https://crrev.com/5b09ac35a71c52b974ef4e40ebf2b492f54a3517/content/browser/content_service_delegate_impl.cc [modify] https://crrev.com/5b09ac35a71c52b974ef4e40ebf2b492f54a3517/services/content/public/mojom/navigable_contents.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/61e332ceb65f84c093ebe36d7dd98f570307f6a6 commit 61e332ceb65f84c093ebe36d7dd98f570307f6a6 Author: Ken Rockot <rockot@chromium.org> Date: Tue Oct 02 01:06:24 2018 [content-service] Support alternative remote views == First some background: The NavigableContentsView client library by default uses views::RemoteViewHost to support embedding of a remote view within a client's own UI on platforms that support both Views and the Window Service. This is fine unless the client is running in the same process as the Window Service, which is in the case for out-of-process Ash. That is, when running Ash outside of the browser process on Chrome OS, we have it share a process with the Window Service. The Window Service implementation defines a ws::ServerRemoteViewHost which serves essentially the same purpose as views::RemoteViewHost but which actually works within the Window Service process. We obviously cannot tolerate the Content Service client library having a dependency on the Window Service (let alone its private implementation!). == What this CL does: Introduces a static NavigableContentsView::SetRemoteViewFactory API which can be called by a client to provide process-wide alternative View creation logic for remote views. If unset, the client library will continue to use views::RemoteViewHost for remote views. Ash uses this static method when setting up its in-process Window Service instance, providing a factory which emits ws::ServerRemoteViewHost objects. No Content Service implementation changes are required to support this, as it's really just a detail of how clients interface with the Window Service to support remote views. Bug: 854367 Change-Id: Ic6b09502ea2f84c3a4594e69e2a531a4efc1e3da Reviewed-on: https://chromium-review.googlesource.com/1237376 Commit-Queue: Ken Rockot <rockot@chromium.org> Reviewed-by: Camille Lamy <clamy@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#595674} [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/ash/BUILD.gn [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/ash/DEPS [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/ash/ws/window_service_owner.cc [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/services/content/navigable_contents_impl.cc [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/services/content/public/cpp/BUILD.gn [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/services/content/public/cpp/navigable_contents_view.cc [modify] https://crrev.com/61e332ceb65f84c093ebe36d7dd98f570307f6a6/services/content/public/cpp/navigable_contents_view.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3d31e76e536f52dd858b53e0e8c46865c60e507b commit 3d31e76e536f52dd858b53e0e8c46865c60e507b Author: Ken Rockot <rockot@chromium.org> Date: Fri Oct 05 20:23:47 2018 Split remote views' window attachment from embed This changes views::RemoteViewHost and ws::ServerRemoteViewHost slightly, such that they are attached to an aura window as soon as possible (upon addition to a widget) rather than waiting for the initiation of an embed request. Bug: 854367 Change-Id: I684abe7568318b0ced412e1bc6bdb52a866aa9b5 Reviewed-on: https://chromium-review.googlesource.com/c/1255460 Commit-Queue: Ken Rockot <rockot@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#597273} [modify] https://crrev.com/3d31e76e536f52dd858b53e0e8c46865c60e507b/services/ws/remote_view_host/server_remote_view_host.cc [modify] https://crrev.com/3d31e76e536f52dd858b53e0e8c46865c60e507b/services/ws/remote_view_host/server_remote_view_host.h [modify] https://crrev.com/3d31e76e536f52dd858b53e0e8c46865c60e507b/ui/views/mus/remote_view/remote_view_host.cc [modify] https://crrev.com/3d31e76e536f52dd858b53e0e8c46865c60e507b/ui/views/mus/remote_view/remote_view_host.h [modify] https://crrev.com/3d31e76e536f52dd858b53e0e8c46865c60e507b/ui/views/mus/remote_view/remote_view_host_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/161744bd594dea2a0b47abe9e15ded79f6e3940d commit 161744bd594dea2a0b47abe9e15ded79f6e3940d Author: Ken Rockot <rockot@chromium.org> Date: Wed Oct 10 02:46:53 2018 [content-service] Split remote view create/embed Changes NavigableContentsView to always have a NativeView available upon construction and throughout its lifetime, for both the in-process and out-of-process client cases. This generally makes the API easier to use. Because embedding can't necessarily be done at construction time, this also means splitting NativeView create and embed operations, which were previously merged into a single step. NavigableContentsView::RemoteViewManager is introduced to support clients overriding the default view construction and embedding behavior. Bug: 854367 Change-Id: If0aef59d0b82ee235aed61e1fad8359c26aec52a Reviewed-on: https://chromium-review.googlesource.com/c/1269440 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#598190} [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/ash/ws/window_service_owner.cc [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/chrome/common/features.gni [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/services/content/navigable_contents_impl.cc [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/services/content/navigable_contents_impl.h [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/services/content/public/cpp/BUILD.gn [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/services/content/public/cpp/navigable_contents_view.cc [modify] https://crrev.com/161744bd594dea2a0b47abe9e15ded79f6e3940d/services/content/public/cpp/navigable_contents_view.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6bcda46578e9178540382f2fa0db9addfc14756b commit 6bcda46578e9178540382f2fa0db9addfc14756b Author: Ken Rockot <rockot@chromium.org> Date: Mon Oct 15 21:08:01 2018 [content-service] Allow custom navigation handling Adds a |suppress_navigations| option to NavigableContentsParams, allowing clients to block navigations from occurring as a result of e.g. user gesture or scripting behavior. When enabled, suppressed navigations instead trigger a message on the NavigableContentsClient interface and a corresponding event on any attached NavigableContentsObservers. Bug: 854367 Change-Id: I85b4a0ca970f83a4d0b27e56843f99841434c483 Reviewed-on: https://chromium-review.googlesource.com/c/1269444 Commit-Queue: Ken Rockot <rockot@chromium.org> Reviewed-by: Camille Lamy <clamy@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/master@{#599748} [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/content/browser/content_service_browsertest.cc [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/content/browser/content_service_delegate_impl.cc [add] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/content/test/data/navigate_on_load.html [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/cpp/BUILD.gn [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/cpp/navigable_contents.cc [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/cpp/navigable_contents.h [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/cpp/navigable_contents_observer.h [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/mojom/BUILD.gn [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/mojom/navigable_contents.mojom [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/public/mojom/navigable_contents_factory.mojom [modify] https://crrev.com/6bcda46578e9178540382f2fa0db9addfc14756b/services/content/service_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348 commit d1fb11bda465e0a778c8a8d6a2c10a8c19a84348 Author: Ken Rockot <rockot@google.com> Date: Fri Nov 02 05:58:40 2018 [content-service] Add FakeNavigableContentsFactory Adds a new test support library with a single helper class, FakeNavigableContentsFactory. This allows unit test code to fake out a basic Content Service implementation to help drive Content Service client code under test. Bug: 854367 Change-Id: I3e81aa7b6540aa35347e6c3311c0f816cb945a01 Reviewed-on: https://chromium-review.googlesource.com/c/1277960 Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#604853} [modify] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/BUILD.gn [modify] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/navigable_contents_view.h [add] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/test/BUILD.gn [add] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/test/fake_navigable_contents.cc [add] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/test/fake_navigable_contents.h [add] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/test/fake_navigable_contents_factory.cc [add] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/test/fake_navigable_contents_factory.h [add] https://crrev.com/d1fb11bda465e0a778c8a8d6a2c10a8c19a84348/services/content/public/cpp/test/fake_navigable_contents_factory_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/68c021ecb39b1b670652dcafa478d0caa3582cbd commit 68c021ecb39b1b670652dcafa478d0caa3582cbd Author: Ken Rockot <rockot@chromium.org> Date: Sat Nov 03 08:51:53 2018 [ash] app_list answer cards => Content Service Changes the app_list UI to use Content Service client library to display answer card web contents, rather than using some one-off IPCs to drive remote WebContents behavior with a special WebContentsDelegate/Observer in chrome/browser code. This allows quite a bit of code to be deleted from src/chrome while retaining all the existing functionality of answer cards in the app_list search UI. Prior to this change, AnswerCardSearchProvider would query the potential card URL (i.e. google.com/coac?q=whatever) and only send a corresponding search result back to Ash if the response was a valid card response. Instead, now all queries are treated as potentially valid search results, and AnswerCardSearchProvider is little more than a translator which turns a search query string into a useful answer card query URL. Ash-side code then navigates its own NavigableContents to any potential card URL it receives, inspecting response headers to determine whether or not the contents are actually a card. If they are, it displays them in the UI. The key results of this CL are: * Most relevant app_list answer card support logic lives in Ash now. A future change could probably move the rest of it, but that requires a more fundamental reconsideration of the browser's role (or non-role) in supporting app_list search behavior. * All of the Ash/Chrome code to support answer cards in the app_list UI is unified for in- and out-of-process Ash cases. * We have a working Content Service client being used in production Chrome OS code, which establishes precedent for improving several other features that embed WebContents within Chrome OS system UI. Bug: 854367 Change-Id: Id913460d7a4bd4558d385b9b3f9b52845aa0f0e7 Reviewed-on: https://chromium-review.googlesource.com/c/1269622 Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by: Eric Roman <eroman@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Reviewed-by: Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#605166} [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/BUILD.gn [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/DEPS [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/app_list_controller_impl.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/app_list_controller_impl.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/app_list_view_delegate.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/model/search/search_model.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/model/search/search_result.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/test/app_list_test_view_delegate.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/test/app_list_test_view_delegate.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/test/test_app_list_client.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/views/app_list_view_unittest.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/views/search_result_answer_card_view.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/views/search_result_answer_card_view.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/app_list/views/search_result_answer_card_view_unittest.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/public/cpp/BUILD.gn [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/public/interfaces/BUILD.gn [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/public/interfaces/app_list.mojom [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/shell.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/ash/shell/app_list.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/BUILD.gn [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/DEPS [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/app_list_client_impl.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/app_list_client_impl.h [delete] https://crrev.com/083aa122fd1e61407ecaacd42df51c4d76bc4995/chrome/browser/ui/app_list/search/answer_card/answer_card_contents.cc [delete] https://crrev.com/083aa122fd1e61407ecaacd42df51c4d76bc4995/chrome/browser/ui/app_list/search/answer_card/answer_card_contents.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/answer_card/answer_card_result.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/answer_card/answer_card_result.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/answer_card/answer_card_result_unittest.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/answer_card/answer_card_search_provider.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/answer_card/answer_card_search_provider.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/answer_card/answer_card_search_provider_unittest.cc [delete] https://crrev.com/083aa122fd1e61407ecaacd42df51c4d76bc4995/chrome/browser/ui/app_list/search/answer_card/answer_card_web_contents.cc [delete] https://crrev.com/083aa122fd1e61407ecaacd42df51c4d76bc4995/chrome/browser/ui/app_list/search/answer_card/answer_card_web_contents.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/chrome_search_result.cc [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/chrome_search_result.h [modify] https://crrev.com/68c021ecb39b1b670652dcafa478d0caa3582cbd/chrome/browser/ui/app_list/search/search_controller_factory.cc
Comment 1 by roc...@chromium.org
, Jun 19 2018