New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 677564 link

Starred by 36 users

Issue metadata

Status: Fixed
Owner:
Last visit 28 days ago
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task
Launch-Security: NA

Blocked on:
issue 677565



Sign in to add a comment

Add support for Asynchronous Clipboard API

Project Member Reported by garykac@chromium.org, Dec 29 2016

Issue description

Add support for a modern, asynchronous Clipboard API based on Promises.

The primary motivation for this proposal is to address the following issues present in the current synchronous Clipboard API:

* For security reasons, user agents may need to sanitize images before putting them on the clipboard. This can be time-consuming for large images so it is not reasonable to do it on the main thread. Thus, the current synchronous-nature of the current API prevents images from being supported in some UAs.

* Synchronous APIs restrict the options for getting user permission before performing an action. Some permission models (like the Permissions API) require an async API.

Editor's Draft Clipboard Spec: https://w3c.github.io/clipboard-apis/

Explainer: https://github.com/garykac/clipboard/blob/master/clipboard.md

WICG Discourse: https://discourse.wicg.io/t/proposal-modern-asynchronous-clipboard-api/1513

 
Blockedon: 677565

Comment 2 by evn@google.com, Dec 30 2016

Labels: Launch-Security-Started
Labels: -Launch-Security-Started Launch-Security-NA
Security set to N/A as Launch-OWP issues aren't to be used for approvals.

Is there a PM assisting on this feature? If not then I can help find one to assist with this.

Since this launch likely has privacy, security, testing implications you will need to create a type=Launch issue and mark it as blocking this issue to track approval, which is ideally done with the support of a PM to chase down approvals.

See this doc for more details: https://docs.google.com/document/d/1Z9x-PBYgDaR99tsNLvhibZLeAwDR757Gor--I60ygeE/edit
Cc: garykac@chromium.org dcheng@chromium.org lghall@google.com lgar...@chromium.org
 Issue 593475  has been merged into this issue.
Here's another use case for extra motivation:

* Sometimes it's useful to automatically copy something that has to be generated on the server side. Currently there is no reliable way to copy something after an XHR completes, if it takes more than the few milliseconds that seem to count "as part of the same user gesture", requiring two clicks to first generate and fetch, then copy.
> Currently there is no reliable way to copy something after an XHR completes

Note that this is a *feature* of the gesture requirement. Otherwise, a site can save up a gesture and use a delayed/long-polling XHR to use up the gesture any time in the future – and, in particular, long after the user is actually use the page. In this case, something would appear on the user/s clipboard randomly a few seconds afterwards.

We can add more heuristics like "allow punting a gesture consumption after XHR as long as the user has kept the page in the foreground", but I don't think that's a good idea.
But users are not going to immediately notice when a site copies something random to their clipboard in a click or keypress. There is no indication that the clipboard has changed. And can't sites use sync XHR to work around the restriction?
A permission prompt would be appropriate for both inside and outside user gestures.
@Igar: Yes, I do know why the whole user gesture thing exists. But to me it seems like the original use case about sanitizing images in the background would have the exact same problem with unexpected clipboard access.

@danielhe: I've tried a sync XHR, and it seems the user gesture heuristic additionally uses a timeout of some milliseconds, after which it expires and even if you're still inside the click event handler, copying is not allowed anymore.
> And can't sites use sync XHR to work around the restriction?

No, there's a short timeout (1 second)? Anything longer, and you need a new gesture.

> A permission prompt would be appropriate for both inside and outside user gestures.

We don't want too many permission prompts, or too many kinds of permissions. The current situation hasn't seen too much abuse, but we'll certainly have to think about it if we expose qualitatively new features (rather than the base copy functionality for the new API).
I filed https://github.com/w3c/clipboard-apis/issues/41 to consider supporting delayed clipboard data. That could probably address mvirkkunen's use case as well.
Shall we track the DataTransfer constructor as part of this, or a separate bug?

Spec change: https://github.com/whatwg/html/commit/688a102b52c7050a6808a05c5d8fe149c0937fd7
Tests: http://w3c-test.org/html/editing/dnd/datastore/datatransfer-constructor-001.html
It's a trivial change, so I think it makes sense to track here (since clipboard is the primary motivation for adding it now).
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 1 2017

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

commit 1f2f12faf6b42983525f917bd5fabc2f02bdf8a3
Author: garykac <garykac@chromium.org>
Date: Sat Apr 01 00:09:04 2017

Add constructor for DataTransfer

This is being added to support the Asynchronous Clipboard API, which
requires a DataTransfer object to store the data for the write() operation.

DataTransfer:
Intent to Implement & Ship: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/NY8OPSzHGuE
WHATWG HTML spec bug: https://github.com/whatwg/html/issues/2190
Spec: https://html.spec.whatwg.org/multipage/interaction.html#the-datatransfer-interface
W3C WebPlatformTest PR: https://github.com/w3c/web-platform-tests/pull/5232

Async Clipboard:
W3C Spec: https://w3c.github.io/clipboard-apis/#async-clipboard-api

BUG= 677564 

Review-Url: https://codereview.chromium.org/2784473003
Cr-Commit-Position: refs/heads/master@{#461281}

[delete] https://crrev.com/600e4f21b281216ddd57b3644a44ffe7471a67d2/third_party/WebKit/LayoutTests/external/wpt/html/editing/dnd/datastore/datatransfer-constructor-001-expected.txt
[modify] https://crrev.com/1f2f12faf6b42983525f917bd5fabc2f02bdf8a3/third_party/WebKit/LayoutTests/fast/dom/dom-constructors-expected.txt
[modify] https://crrev.com/1f2f12faf6b42983525f917bd5fabc2f02bdf8a3/third_party/WebKit/LayoutTests/fast/dom/dom-constructors.html
[modify] https://crrev.com/1f2f12faf6b42983525f917bd5fabc2f02bdf8a3/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp
[modify] https://crrev.com/1f2f12faf6b42983525f917bd5fabc2f02bdf8a3/third_party/WebKit/Source/core/clipboard/DataTransfer.h
[modify] https://crrev.com/1f2f12faf6b42983525f917bd5fabc2f02bdf8a3/third_party/WebKit/Source/core/clipboard/DataTransfer.idl

Project Member

Comment 14 by bugdroid1@chromium.org, Jul 8 2017

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

commit ac319a7ed300e2d8b7de3e6dcdfce2acf3363122
Author: garykac <garykac@chromium.org>
Date: Sat Jul 08 00:53:09 2017

Initial version of Async Clipboard API

Includes basic support for plaintext read/write.

See https://w3c.github.io/clipboard-apis/

BUG= 677564 

Review-Url: https://codereview.chromium.org/2695593006
Cr-Commit-Position: refs/heads/master@{#485121}

[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/W3CImportExpectations
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-interfaces.https.html
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-navigator-clipboard-basics.https.html
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-write-dttext-read-dttext-manual.https.html
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-write-dttext-read-text-manual.https.html
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-write-text-read-dttext-manual.https.html
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/async-write-text-read-text-manual.https.html
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/external/wpt/interfaces/clipboard.idl
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/clipboard/BUILD.gn
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/clipboard/Clipboard.cpp
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/clipboard/Clipboard.h
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/clipboard/Clipboard.idl
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/clipboard/ClipboardPromise.cpp
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/clipboard/ClipboardPromise.h
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/events/EventTargetFactory.json5
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/frame/BUILD.gn
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/frame/NavigatorClipboard.cpp
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/frame/NavigatorClipboard.h
[add] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/core/frame/NavigatorClipboard.idl
[modify] https://crrev.com/ac319a7ed300e2d8b7de3e6dcdfce2acf3363122/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Labels: migrated-launch-owp Type-Task
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues.

We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate.

For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit

For any questions, please contact owencm, sshruthi, larforge
Components: Privacy
Labels: Pri-3
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 27 2017

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

commit fc645d564a75b907446b9a820e272e15f9c9fdd0
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Fri Oct 27 18:30:40 2017

Initial support for Clipboard Permission

This is just the Webkit side of the permission. A follow-up cl will
add UX support and hook up clipboard code to use this permission.

Bug:  677564 
Change-Id: If944340769c0192a9e123b7fc4b57b22b0619cac
Reviewed-on: https://chromium-review.googlesource.com/720158
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Jeffrey Yasskin <jyasskin@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512248}
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/Source/modules/modules_idl_files.gni
[add] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/Source/modules/permissions/ClipboardPermissionDescriptor.idl
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/Source/modules/permissions/PermissionDescriptor.idl
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/Source/modules/permissions/PermissionUtils.cpp
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/Source/modules/permissions/PermissionUtils.h
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/Source/modules/permissions/Permissions.cpp
[modify] https://crrev.com/fc645d564a75b907446b9a820e272e15f9c9fdd0/third_party/WebKit/public/platform/modules/permissions/permission.mojom

Project Member

Comment 19 by bugdroid1@chromium.org, Nov 14 2017

Project Member

Comment 20 by bugdroid1@chromium.org, Nov 17 2017

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

commit 726325eeb6093fede34a18b3ec14756b0e684fdf
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Fri Nov 17 07:12:08 2017

Add clipboard permission type and context

This cl adds the basic Clipboard PermissionType and the
PermissionContext.

UX for this permission (which will be behind a feature flag) will
be added in a follow-up cl.

Bug:  677564 
Change-Id: Ia5909c8f1feeedad5471db87630154071d7ba8ac
Reviewed-on: https://chromium-review.googlesource.com/759029
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517332}
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/android_webview/browser/aw_permission_manager.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/app/generated_resources.grd
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/app/vector_icons/BUILD.gn
[add] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/app/vector_icons/content_paste.icon
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/BUILD.gn
[add] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/clipboard/OWNERS
[add] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/clipboard/clipboard_read_permission_context.cc
[add] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/clipboard/clipboard_read_permission_context.h
[add] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/clipboard/clipboard_write_permission_context.cc
[add] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/clipboard/clipboard_write_permission_context.h
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/permissions/permission_manager.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/permissions/permission_request.h
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/permissions/permission_request_impl.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/permissions/permission_util.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/components/content_settings/core/browser/content_settings_registry.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/components/content_settings/core/common/content_settings.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/components/content_settings/core/common/content_settings_types.h
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/content/browser/permissions/permission_service_impl.cc
[modify] https://crrev.com/726325eeb6093fede34a18b3ec14756b0e684fdf/content/public/browser/permission_type.h

Project Member

Comment 21 by bugdroid1@chromium.org, Nov 22 2017

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

commit 10533cf121c9c5b969921aacc91d52270c3e3430
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Wed Nov 22 03:31:28 2017

Initial desktop UX support for Clipboard Permission

This adds the content setting for the new Async Clipboard API
and the UX plumbing. This is behind the kClipboardContentSetting
feature flag.

Bug:  677564 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I59ec221057fc6dd73ca830b1d6889ac40b44be68
Reviewed-on: https://chromium-review.googlesource.com/750200
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Patti <patricialor@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518524}
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/app/settings_strings.grdp
[add] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/app/theme/default_100_percent/common/allowed_clipboard.png
[add] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/app/theme/default_100_percent/common/blocked_clipboard.png
[add] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/app/theme/default_200_percent/common/allowed_clipboard.png
[add] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/app/theme/default_200_percent/common/blocked_clipboard.png
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/app/theme/theme_resources.grd
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/icons.html
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/privacy_page/privacy_page.html
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/privacy_page/privacy_page.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/route.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/site_settings/category_default_setting.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/site_settings/constants.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/site_settings/site_details.html
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/site_settings/site_details.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/site_settings_page/site_settings_page.html
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/ui/page_info/page_info.cc
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/ui/page_info/page_info_ui.cc
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/test/data/webui/settings/all_sites_tests.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/test/data/webui/settings/site_details_tests.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/test/data/webui/settings/site_list_tests.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
[modify] https://crrev.com/10533cf121c9c5b969921aacc91d52270c3e3430/components/page_info_strings.grdp

Project Member

Comment 22 by bugdroid1@chromium.org, Nov 30 2017

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

commit 4c2fcd55d47091a8bbe1c5932100baca76053c60
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Thu Nov 30 18:20:07 2017

Move clipboard from core/ to modules/

This is requires so that the clipboard code can access the Permission
methods (since core/ can't reach into modules/). Permission checks
will be added in a follow-up cl.

Bug:  677564 
Change-Id: Ia5dbf39a05ab5acb0b0aa5504bdf8a783751a6fb
Reviewed-on: https://chromium-review.googlesource.com/798125
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520606}
[modify] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/core/clipboard/BUILD.gn
[modify] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/core/clipboard/DataTransferItemList.h
[modify] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/core/frame/BUILD.gn
[modify] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/BUILD.gn
[add] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/BUILD.gn
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/Clipboard.cpp
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/Clipboard.h
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/Clipboard.idl
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h
[add] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/DEPS
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/NavigatorClipboard.cpp
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/NavigatorClipboard.h
[rename] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/clipboard/NavigatorClipboard.idl
[modify] https://crrev.com/4c2fcd55d47091a8bbe1c5932100baca76053c60/third_party/WebKit/Source/modules/modules_idl_files.gni

Project Member

Comment 23 by bugdroid1@chromium.org, Dec 20 2017

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

commit ba383e4bb1330749c36483b7b5b994a1f5281848
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Wed Dec 20 23:41:00 2017

Update clipboard API calls to use clipboard permissions.

This adds permission checks to make sure that the user has granted
appropriate permission for the clipboard API methods.

Bug:  677564 
Change-Id: I5af221b0e18d45509ff2a8c3856680e598a51dcb
Reviewed-on: https://chromium-review.googlesource.com/804973
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525516}
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/chrome/browser/permissions/permission_uma_util.cc
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/chrome/browser/permissions/permission_util.cc
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/content/shell/browser/layout_test/layout_test_message_filter.cc
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/NeverFixTests
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https.html
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https.html
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https.html
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
[add] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https.html
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
[modify] https://crrev.com/ba383e4bb1330749c36483b7b5b994a1f5281848/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h

Project Member

Comment 24 by bugdroid1@chromium.org, Dec 21 2017

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

commit 1658c4250d861640c0b6d9982bbd7a7184140004
Author: Thomas Anderson <thomasanderson@chromium.org>
Date: Thu Dec 21 00:44:47 2017

Revert "Update clipboard API calls to use clipboard permissions."

This reverts commit ba383e4bb1330749c36483b7b5b994a1f5281848.

Reason for revert: Causing WebClipboardImplTest.ImageCopy to fail on Cast Audio Linux:
https://ci.chromium.org/buildbot/chromium.linux/Cast%20Audio%20Linux/7455

Original change's description:
> Update clipboard API calls to use clipboard permissions.
> 
> This adds permission checks to make sure that the user has granted
> appropriate permission for the clipboard API methods.
> 
> Bug:  677564 
> Change-Id: I5af221b0e18d45509ff2a8c3856680e598a51dcb
> Reviewed-on: https://chromium-review.googlesource.com/804973
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Raymes Khoury <raymes@chromium.org>
> Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
> Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#525516}

TBR=raymes@chromium.org,dcheng@chromium.org,garykac@chromium.org,piman@chromium.org,foolip@chromium.org

Change-Id: Ic41c03a8e2acd737fe709626f0938e18cf341565
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  677564 
Reviewed-on: https://chromium-review.googlesource.com/838340
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525538}
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/chrome/browser/permissions/permission_uma_util.cc
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/chrome/browser/permissions/permission_util.cc
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/content/shell/browser/layout_test/layout_test_message_filter.cc
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/third_party/WebKit/LayoutTests/NeverFixTests
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https.html
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https.html
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https.html
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
[delete] https://crrev.com/c515925f3ee0b419a0358c9fef4ce975d70dc817/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https.html
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
[modify] https://crrev.com/1658c4250d861640c0b6d9982bbd7a7184140004/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h

Project Member

Comment 25 by bugdroid1@chromium.org, Jan 4 2018

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

commit f8d1e9f22fc8e97d37515e605457673a98ad4ea5
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Thu Jan 04 10:29:58 2018

Reland "Update clipboard API calls to use clipboard permissions."

This is a reland of ba383e4bb1330749c36483b7b5b994a1f5281848
Original change's description:
> Update clipboard API calls to use clipboard permissions.
> 
> This adds permission checks to make sure that the user has granted
> appropriate permission for the clipboard API methods.
> 
> Bug:  677564 
> Change-Id: I5af221b0e18d45509ff2a8c3856680e598a51dcb
> Reviewed-on: https://chromium-review.googlesource.com/804973
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Raymes Khoury <raymes@chromium.org>
> Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
> Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#525516}

Bug:  677564 
Change-Id: Id2fd27d775d165713fe3a3b3c6b56387da76835b
Reviewed-on: https://chromium-review.googlesource.com/846725
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526955}
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/chrome/browser/permissions/permission_uma_util.cc
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/chrome/browser/permissions/permission_util.cc
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/content/shell/browser/layout_test/layout_test_message_filter.cc
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/NeverFixTests
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https-expected.txt
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/readtext-denied.https.html
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https-expected.txt
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/readtext-granted.https.html
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https-expected.txt
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/writetext-denied.https.html
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https-expected.txt
[add] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/clipboard/writetext-granted.https.html
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/LayoutTests/http/tests/resources/permissions-helper.js
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.cpp
[modify] https://crrev.com/f8d1e9f22fc8e97d37515e605457673a98ad4ea5/third_party/WebKit/Source/modules/clipboard/ClipboardPromise.h

Project Member

Comment 26 by bugdroid1@chromium.org, Jan 10 2018

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

commit 8609b49f08960b888bc89029ace87af18db6dc62
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Wed Jan 10 22:44:17 2018

Update setting strings for clipboard permission.

Bug:  677564 
Change-Id: I6c74468ee9b7e13130fa923d9ac58ad435aae39d
Reviewed-on: https://chromium-review.googlesource.com/860988
Reviewed-by: Tommy Li <tommycli@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528452}
[modify] https://crrev.com/8609b49f08960b888bc89029ace87af18db6dc62/chrome/app/settings_strings.grdp

Project Member

Comment 27 by bugdroid1@chromium.org, Jan 11 2018

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

commit bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Thu Jan 11 19:08:25 2018

Add support for clipboard omnibar icons.

Bug:  677564 
Change-Id: I2c68a21b4c719205521be577c446211c98755f22
Reviewed-on: https://chromium-review.googlesource.com/855296
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528699}
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/app/generated_resources.grd
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/clipboard/clipboard_read_permission_context.cc
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/clipboard/clipboard_read_permission_context.h
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/content_settings/tab_specific_content_settings.cc
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/ui/content_settings/content_setting_image_model.cc
[modify] https://crrev.com/bebbf59fe8cab0ebaa1f530977f3cbfbf6c979c4/chrome/browser/ui/content_settings/content_setting_image_model.h

Project Member

Comment 28 by bugdroid1@chromium.org, Jan 18 2018

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

commit 70210a4a24b628f1d2a5797f9979466c8484667e
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Thu Jan 18 22:47:36 2018

Update clipboard permission UX strings (and descriptions)

These changes are based on comments made on
https://chromium-review.googlesource.com/c/chromium/src/+/855296
after the cl landed.

Bug:  677564 
Change-Id: I6282fca68658847e84b64e9b5f373135c11ca7bf
Reviewed-on: https://chromium-review.googlesource.com/862737
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530317}
[modify] https://crrev.com/70210a4a24b628f1d2a5797f9979466c8484667e/chrome/app/generated_resources.grd

Project Member

Comment 29 by bugdroid1@chromium.org, Jan 23 2018

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

commit 7420ed1318a5e9a3410201ac86755e4a976ff268
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Tue Jan 23 01:34:27 2018

Move Clipboard permission to end of Content Settings list.

Order of Content Setting permission is discussed in:
https://bugs.chromium.org/p/chromium/issues/detail?id=610358

and specified in:
https://docs.google.com/spreadsheets/d/1bVRBeEcJ3YSJNMKq9U9pm-dGFtVRDryzfojoDeYpirI/edit#gid=0

Bug:  677564 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I67f0c152f0864206ff7a13d445679e4b3bc34977
Reviewed-on: https://chromium-review.googlesource.com/877408
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531116}
[modify] https://crrev.com/7420ed1318a5e9a3410201ac86755e4a976ff268/chrome/browser/resources/settings/site_settings/site_details.html
[modify] https://crrev.com/7420ed1318a5e9a3410201ac86755e4a976ff268/chrome/browser/resources/settings/site_settings_page/site_settings_page.html

Project Member

Comment 30 by bugdroid1@chromium.org, Jan 23 2018

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

commit 93aefc614b5b5ee8abb16bccd8ac8bd6521a4795
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Tue Jan 23 01:43:39 2018

Initial clipboard Site setting UX for android

Bug:  677564 
Change-Id: I58ba4572bb74ef8519431f7d7f14791b3ddbc5cb
Reviewed-on: https://chromium-review.googlesource.com/865777
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531120}
[add] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/drawable-hdpi/ic_content_paste_grey600_24dp.png
[add] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/drawable-mdpi/ic_content_paste_grey600_24dp.png
[add] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/drawable-xhdpi/ic_content_paste_grey600_24dp.png
[add] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/drawable-xxhdpi/ic_content_paste_grey600_24dp.png
[add] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/drawable-xxxhdpi/ic_content_paste_grey600_24dp.png
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/xml/single_website_preferences.xml
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/res/xml/site_settings_preferences.xml
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
[add] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ClipboardInfo.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/ContentSettingsResources.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleWebsitePreferences.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcher.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsitePreferenceBridge.java
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java/strings/android_chrome_strings.grd
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/android/java_sources.gni
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/browser/android/chrome_feature_list.cc
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/browser/android/preferences/pref_service_bridge.cc
[modify] https://crrev.com/93aefc614b5b5ee8abb16bccd8ac8bd6521a4795/chrome/browser/android/preferences/website_preference_bridge.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Feb 6 2018

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

commit 55d0c6efbf2e9489537fb409365a4fd9964a33cd
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Tue Feb 06 20:04:07 2018

Fix Clipboard permission icons on Android

Current icon is set to WARNING, which is incorrect.

Bug:  677564 
Change-Id: Ia89d1a67053cd635fa791dc6bc8b7978f886a76b
Reviewed-on: https://chromium-review.googlesource.com/900269
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534765}
[add] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/android/java/res/drawable-hdpi/infobar_clipboard.png
[add] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/android/java/res/drawable-mdpi/infobar_clipboard.png
[add] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/android/java/res/drawable-xhdpi/infobar_clipboard.png
[add] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/android/java/res/drawable-xxhdpi/infobar_clipboard.png
[add] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/android/java/res/drawable-xxxhdpi/infobar_clipboard.png
[modify] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/browser/android/resource_id.h
[modify] https://crrev.com/55d0c6efbf2e9489537fb409365a4fd9964a33cd/chrome/browser/permissions/permission_request_impl.cc

Project Member

Comment 32 by bugdroid1@chromium.org, Feb 8 2018

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

commit 873e52cbe5e69d278b1c214898c597553b705621
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Thu Feb 08 02:08:36 2018

Use 'site' instead of 'page' for clipboard UI strings.

Bug:  677564 
Change-Id: I1cef216ecd222745ef66bcb27e266ab5588eca5f
Reviewed-on: https://chromium-review.googlesource.com/900137
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535255}
[modify] https://crrev.com/873e52cbe5e69d278b1c214898c597553b705621/chrome/app/generated_resources.grd

Project Member

Comment 33 by bugdroid1@chromium.org, Feb 16 2018

Project Member

Comment 34 by bugdroid1@chromium.org, Feb 28 2018

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

commit f0e17300c0a7428e954261ac30895e237a9984ee
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Wed Feb 28 02:29:56 2018

Enable text-only parts of Async Clipboard API by default

Previously, we RuntimeEnable'd the entire |clipboard| object on the
navigator so that the entire feature is disabled.

To launch the text-only APIs, this cl enables the |clipboard|
object, and disables all the non-text APIs.

Launch bug: crbug.com/677565

Launch review approval: https://groups.google.com/a/google.com/forum/#!topic/chrome-launch-review/ux6GtFyICVs


Bug:  677564 
Change-Id: Iee7a21f71eacb4521f83afbdb23c22b37b0b5881
Reviewed-on: https://chromium-review.googlesource.com/865516
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539666}
[modify] https://crrev.com/f0e17300c0a7428e954261ac30895e237a9984ee/chrome/common/chrome_features.cc
[modify] https://crrev.com/f0e17300c0a7428e954261ac30895e237a9984ee/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/f0e17300c0a7428e954261ac30895e237a9984ee/third_party/WebKit/Source/modules/clipboard/Clipboard.idl
[modify] https://crrev.com/f0e17300c0a7428e954261ac30895e237a9984ee/third_party/WebKit/Source/modules/clipboard/NavigatorClipboard.idl

Is it workable on Canary?

67.0.3362.0 Canary console:

navigator.clipboard.readText().then(text => { console.log(`text: ${text}`); }).catch(e => { console.error(e); });

The result is attached.


Yes, but you can't test it that way in the console.

See https://bugs.chromium.org/p/chromium/issues/detail?id=798917&desc=2#c9

The current tab needs to have focus for this API to be enabled, and the devconsole having focus is not the same as the tab having focus.
Thank you!
Project Member

Comment 39 by bugdroid1@chromium.org, Mar 15 2018

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

commit b94978cfefdfbd0eb5f2cc6b6ef667da52763240
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Thu Mar 15 21:34:55 2018

Remove flag check for clipboard-read/write permission.query

The AsyncClipboardAPI feature flag used to control access to the entire
async clipboard API, but (since we're now shipping the text portions of
the API) its meaning has been changed to control access only to the parts
of the API that are still under development (e.g., image and delayed
generation support).

The Clipboard permission is shipping as part of the text APIs, so it
should no longer be checking this feature flag.

Bug:  677564 , 821947 
Change-Id: Ia57b57df3eae03c2d4372cf5e7472ef1d0532f49
Reviewed-on: https://chromium-review.googlesource.com/963287
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543504}
[modify] https://crrev.com/b94978cfefdfbd0eb5f2cc6b6ef667da52763240/third_party/WebKit/Source/modules/permissions/Permissions.cpp

Project Member

Comment 40 by bugdroid1@chromium.org, Mar 19 2018

Labels: merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/110e2347eff57cf1c97b18663e75ad37f2c96a3f

commit 110e2347eff57cf1c97b18663e75ad37f2c96a3f
Author: Gary Kacmarcik <garykac@chromium.org>
Date: Mon Mar 19 17:50:31 2018

Remove flag check for clipboard-read/write permission.query

The AsyncClipboardAPI feature flag used to control access to the entire
async clipboard API, but (since we're now shipping the text portions of
the API) its meaning has been changed to control access only to the parts
of the API that are still under development (e.g., image and delayed
generation support).

The Clipboard permission is shipping as part of the text APIs, so it
should no longer be checking this feature flag.

Bug:  677564 , 821947 
Change-Id: Ia57b57df3eae03c2d4372cf5e7472ef1d0532f49
Reviewed-on: https://chromium-review.googlesource.com/963287
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#543504}(cherry picked from commit b94978cfefdfbd0eb5f2cc6b6ef667da52763240)
Reviewed-on: https://chromium-review.googlesource.com/969281
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#312}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/110e2347eff57cf1c97b18663e75ad37f2c96a3f/third_party/WebKit/Source/modules/permissions/Permissions.cpp

Sign in to add a comment