New issue
Advanced search Search tips

Issue 839591 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 837684
issue 841020



Sign in to add a comment

Make WindowService as a library support clipboard

Project Member Reported by sky@chromium.org, May 3 2018

Issue description

Hopefully we can copy over the implementation from services/ui/service.cc.
 

Comment 1 by sky@chromium.org, May 8 2018

Blocking: 841020

Comment 2 by sky@chromium.org, May 22 2018

Owner: msw@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, May 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7750b1daa167a2d5855398ca331759f346daceee

commit 7750b1daa167a2d5855398ca331759f346daceee
Author: Mike Wasserman <msw@chromium.org>
Date: Fri May 25 17:17:12 2018

ws: Enable the Window Service clipboard backend for mojo apps

Have ws2::WindowService own a ClipboardImpl, like ws::Service.
Enables copy/paste within the ksv app, but not to/from ash/chrome.
(run ksv app via --keyboard-shortcut-viewer-app, press Ctrl+Alt+/).

TODO: Support copy-paste between mojo apps and Chrome/Ash.

Bug:  839591 
Change-Id: I02b05cb9f830b0053dc0f1ad9e8e702505ad10a4
Reviewed-on: https://chromium-review.googlesource.com/1073572
Commit-Queue: Michael Wasserman <msw@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561923}
[modify] https://crrev.com/7750b1daa167a2d5855398ca331759f346daceee/services/ui/ws2/BUILD.gn
[modify] https://crrev.com/7750b1daa167a2d5855398ca331759f346daceee/services/ui/ws2/window_service.cc
[modify] https://crrev.com/7750b1daa167a2d5855398ca331759f346daceee/services/ui/ws2/window_service.h

Comment 4 by sky@chromium.org, May 29 2018

Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/384f907d6112107d48c5fec96129609a2e260fc4

commit 384f907d6112107d48c5fec96129609a2e260fc4
Author: Mike Wasserman <msw@chromium.org>
Date: Fri Jun 01 01:50:56 2018

Blink: Use SkBitmap instead of blobs in ClipboardHostImpl

Use the bitmap mojo struct with shared memory support instead of blobs.
Convert to PNG in the renderer's DataObjectItem instead of the browser.
(causes a minor perf regression on big images, see crrev.com/1876653003)

This removes the content dep in the clipboard mojo interface and impl.
Hopefully we'll be able to re-use these pieces for mojo apps in ash.

Removes ClipboardHostImpl's thread checks; ui::Clipboard checks itself.

Bug:  839591 
Test: No regressions with using images in the Blink clipboard.
Change-Id: I8a44804385c88cf77388f5840e2f7df6fb746cd9
Reviewed-on: https://chromium-review.googlesource.com/1077072
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563480}
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/browser/renderer_host/clipboard_host_impl.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/browser/renderer_host/clipboard_host_impl.h
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/browser/renderer_host/clipboard_host_impl_unittest.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/shell/browser/layout_test/layout_test_content_browser_client.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/shell/test_runner/pixel_dump.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/test/mock_clipboard_host.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/test/mock_clipboard_host.h
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/content/test/test_blink_web_unit_test_support.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/public/mojom/BUILD.gn
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/public/mojom/clipboard/clipboard.mojom
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/renderer/core/DEPS
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/renderer/core/clipboard/BUILD.gn
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/renderer/core/clipboard/data_object_item.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/renderer/core/clipboard/system_clipboard.cc
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/renderer/core/clipboard/system_clipboard.h
[modify] https://crrev.com/384f907d6112107d48c5fec96129609a2e260fc4/third_party/blink/tools/audit_non_blink_usage.py

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af322827a2f29c907f0c91e45c9f00ca3117a1da

commit af322827a2f29c907f0c91e45c9f00ca3117a1da
Author: Mike Wasserman <msw@chromium.org>
Date: Tue Jun 12 04:16:38 2018

ws: Add ui::mojo::ClipboardHost interface for WindowService and MusClient.

Add a ui::mojo::ClipboardHost&impl in ui/base, to mirror ui::Clipboard.
Rewrite ClipboardMus as ClipboardClient; nix services/ui/clipboard mojom&code.
Add a ClipboardHost to ws2::WindowService, connect MusClient to that.

Support ClipboardWriter custom data without a pickle, changing the type.
Remove service unittests that don't support system clipboard integration.
(the host and client are both tested in ui/views/mus/clipboard_unittest.cc)

Bug:  839591 
Test: Cross-mojo-app copy/paste works (eg. --keyboard-shortcut-viewer-app)
Change-Id: I0023e994d4b657ce17523c1108b4b36cfa4d32b1
Reviewed-on: https://chromium-review.googlesource.com/1076673
Commit-Queue: Michael Wasserman <msw@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566295}
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/chrome/android/BUILD.gn
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/content/common/BUILD.gn
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/mojo/public/cpp/bindings/sync_call_restrictions.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/BUILD.gn
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/BUILD.gn
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/clipboard/BUILD.gn
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/clipboard/OWNERS
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/clipboard/clipboard_impl.cc
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/clipboard/clipboard_impl.h
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/clipboard/clipboard_unittest.cc
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/clipboard/test_manifest.json
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/manifest.json
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/public/cpp/BUILD.gn
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/public/interfaces/BUILD.gn
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/services/ui/public/interfaces/clipboard.mojom
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/service.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/service.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/ws/BUILD.gn
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/ws2/BUILD.gn
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/ws2/window_service.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/services/ui/ws2/window_service.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/third_party/blink/public/mojom/clipboard/clipboard.mojom
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/aura/mus/os_exchange_data_provider_mus.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/clipboard/clipboard_test_template.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/clipboard/clipboard_unittest.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/clipboard/scoped_clipboard_writer.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/clipboard/scoped_clipboard_writer.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/BUILD.gn
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard.mojom
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard.typemap
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_blink.typemap
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_blink_struct_traits.h
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_client.cc
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_client.h
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_host.cc
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_host.h
[add] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_host_mac.mm
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/clipboard_struct_traits.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/mojo/typemaps.gni
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/base/test/test_clipboard_unittest.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/views/mus/BUILD.gn
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/ui/views/mus/clipboard_mus.cc
[delete] https://crrev.com/e1017260ce7c6b300fb3f28be44e34ea03c71efe/ui/views/mus/clipboard_mus.h
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/views/mus/clipboard_unittest.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/views/mus/interactive_ui_tests_manifest.json
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/views/mus/mus_client.cc
[modify] https://crrev.com/af322827a2f29c907f0c91e45c9f00ca3117a1da/ui/views/test/scoped_views_test_helper.cc

Comment 7 by msw@chromium.org, Jun 12 2018

Status: Fixed (was: Started)

Sign in to add a comment