electron/shell/common/api/electron_api_clipboard.cc

299 lines
11 KiB
C++
Raw Normal View History

// Copyright (c) 2013 GitHub, Inc.
2014-04-25 09:49:37 +00:00
// Use of this source code is governed by the MIT license that can be
2013-04-30 08:10:25 +00:00
// found in the LICENSE file.
#include "shell/common/api/electron_api_clipboard.h"
2013-04-30 08:10:25 +00:00
chore: bump chromium to 95.0.4612.5 (main) (#30503) * chore: bump chromium in DEPS to 94.0.4604.0 * build: 3-way merge of chromium patches * chore: bump chromium in DEPS to 94.0.4605.0 * build: 3-way merge of chromium patches * 3076040: Reland Remove delete_children RemoveAllChildViews arg Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3076040 * 3069287: Remove the remaining uses and delete the deprecated API Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3069287 * 2297212: Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey() Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2297212 Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 * 3082756: Change transport_security_persister_path param to be a path to a file. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3082756 > this CL intentionally changes the name of the parameter > in the network context parameters and the order of the constructor > parameters to ensure all callers update their code to pass a full > file path rather than a path to a directory. The 'path' in this diff is already an absolute path, coming from `CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));` at https://github.com/electron/electron/blob/08ff1c2cbf73c8cfe6bca7976e3eddc3626678db/shell/browser/electron_browser_context.cc#L126 * iwyu: network::mojom::HttpRawHeaderPair * fixup! 3076040: Reland Remove delete_children RemoveAllChildViews arg Missed one. * 2999884: CodeHealth: Remove DictionaryValue::GetStringWithoutPathExpansion Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2999884 (example of replacing GetStringWithoutPathExpansion() w/FindStringKey()) Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 (removal of DictionaryValue::GetStringWithoutPathExpansion) * 3059260: Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3059260 We had both of these in a 'disable_features' list. Since these feature have been removed upstream, remove them from our disable list, too. IMPORTANT: this commit should not be backported to older branches that still have these features, because doing so would un-disable them. * 2920890: Load reroute_info from download in-progress and history db back into DownloadItem. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2920890 * 3039323: [Clipboard API] Clipboard Custom Formats implementation Part 5. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * chore: bump chromium in DEPS to 94.0.4606.0 * 3084502: Add a new PrintRasterizePdfDpi policy. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 94.0.4606.3 * chore: bump chromium in DEPS to 95.0.4608.0 * chore: bump chromium in DEPS to 95.0.4609.0 * [DevTools] Remove report_raw_headers from network::ResourceRequest https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * Remove content::WebContentsObserver::OnInterfaceRequestFromFrame https://chromium-review.googlesource.com/c/chromium/src/+/3092665 * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * Add a new PrintRasterizePdfDpi policy. https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 95.0.4609.3 * disable `use_lld` for macos * chore: update patches * Linux: use chrome_crashpad_handler instead of crashpad_handler https://chromium-review.googlesource.com/c/chromium/src/+/3054290 * chore: fix lint * Revert "[DevTools] Remove report_raw_headers from network::ResourceRequest" This reverts commit 28f4da1582d046e96cb58f3cbb590503e89dfd0d. * [DevTools] Remove report_raw_headers from network::ResourceRequest (Attempt #2) https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * DCHECK that predictor always has a non-empty NetworkIsolationKey. https://chromium-review.googlesource.com/c/chromium/src/+/3067698 * Remove --no-untrusted-code-mitigations from //content and //gin https://chromium-review.googlesource.com/c/chromium/src/+/3096585 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure https://chromium-review.googlesource.com/c/chromium/src/+/3059260 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Convert PrintManager to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3072019 * chore: bump chromium in DEPS to 95.0.4612.5 * chore: disable v8 oilpan * [Compiler] Remove untrusted code mitigations. https://chromium-review.googlesource.com/c/v8/v8/+/3045704 * Remove most FTP logic from services/network. https://chromium-review.googlesource.com/c/chromium/src/+/3076119 * Rename scale_factor.h -> resource_scale_factor.h https://chromium-review.googlesource.com/c/chromium/src/+/3057113 * [GURL -> SiteForCookies] extensions/ https://chromium-review.googlesource.com/c/chromium/src/+/3100825 * breadcrumbs: add desktop entry point https://chromium-review.googlesource.com/c/chromium/src/+/3021746 * Move args_ to private in ExtensionFunction https://chromium-review.googlesource.com/c/chromium/src/+/3076261 * chore: iwyu * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * fixup! [Compiler] Remove untrusted code mitigations. * fixup! Disable kDesktopCaptureMacV2 * Revert "chore: disable v8 oilpan" This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0. * Reland "chore: disable v8 oilpan" This reverts commit 1c252765b07a205560e7b5eed06de2605336e2d8. The previous revert was to test on which platforms did the heapsnapshot test actually fail. * [Clipboard API] Clipboard Custom Formats implementation Part 5. https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * Convert ExtensionFrameHost to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3063358 * Convert PDFWebContentsHelper to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3049751 * [Underscore Migration] Migrate ui/legacy https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093160 * chore: remove unknown permission error * chore: fix lint * chore: ignore -Wunreachable-code-return for node deps/ * fixup! chore: ignore -Wunreachable-code-return for node deps/ * fix: windows build * fix: build dependency Dependency was missed in cbeae20438be8baf03ce0e32a73563a80aeccb37 * 3108669: arm,dsp: Fix 8bpp Dct64_NEON(). https://chromium-review.googlesource.com/c/codecs/libgav1/+/3108669 * chore: revert libgav1 roll * Revert "3108669: arm,dsp: Fix 8bpp Dct64_NEON()." This reverts commit 7ed31323127aac8ba2eaff9cae6c9be9a4954f33. * Revert "chore: revert libgav1 roll" This reverts commit 084a490d298811267316c786762fe7aa91b6318d. * chore: revert clang roll * chore: Fix -Wunreachable-code-aggressive warnings in arm and arm64 code Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: mlaurencin <mlaurencin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-08-24 00:52:17 +00:00
#include <map>
#include "base/strings/utf_string_conversions.h"
#include "shell/common/gin_converters/image_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_includes.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkPixmap.h"
#include "ui/base/clipboard/clipboard_format_type.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
chore: bump chromium to 96.0.4664.4 (main) (#31317) * chore: bump chromium in DEPS to 96.0.4662.0 * chore: bump chromium in DEPS to 96.0.4663.0 * chore: update patches * [Extensions] Remove RuntimeData entirely https://chromium-review.googlesource.com/c/chromium/src/+/3177328 * Make helper macros behave consistently for //content/public UserData types https://chromium-review.googlesource.com/c/chromium/src/+/3198788 * Enabling sandboxing for the speech recognition service browser tests https://chromium-review.googlesource.com/c/chromium/src/+/3146090 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * [Reland][Extensions]: Add persistAcrossSessions flag (scripting API) https://chromium-review.googlesource.com/c/chromium/src/+/3175161 * [Bluetooth] Add Passkey prompt dialog for bonding. https://chromium-review.googlesource.com/c/chromium/src/+/2841104 * Clipboard: Remove ReadImage path in browser https://chromium-review.googlesource.com/c/chromium/src/+/3194826 * Split printing metafile code into its own target. https://chromium-review.googlesource.com/c/chromium/src/+/3164925 * Cleanup unused DesktopMediaListObserver params https://chromium-review.googlesource.com/c/chromium/src/+/3179203 * Remove base::DictionaryValue::GetBinary https://chromium-review.googlesource.com/c/chromium/src/+/3201974 * Window Placement: change RWHV::GetDisplayList to GetScreenInfos https://chromium-review.googlesource.com/c/chromium/src/+/3138774 * Add a preview to the Tab Capture picker dialog https://chromium-review.googlesource.com/c/chromium/src/+/3045268 * Add service-based usage to update print settings https://chromium-review.googlesource.com/c/chromium/src/+/3155426 * chore: bump chromium in DEPS to 96.0.4664.2 * chore: update patches * chore: bump chromium in DEPS to 96.0.4664.4 * chore: update patches * chore: bump chromium in DEPS to 97.0.4666.0 * Revert "chore: bump chromium in DEPS to 97.0.4666.0" This reverts commit d73caae8ba4b39efc9b3ea4de52685b9c92ef3d0. * Reland "Block external protocol handler with sandbox." https://chromium-review.googlesource.com/c/chromium/src/+/3198263 * fixup for lint * Add CookiePartitionKeychain parameter to CookeManager.GetCookieList. https://chromium-review.googlesource.com/c/chromium/src/+/3206016 * Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry https://chromium-review.googlesource.com/c/chromium/src/+/3200392 * fixup Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry * ozone: //chrome/browser clean up from USE_X11 https://chromium-review.googlesource.com/c/chromium/src/+/3186490 * content: don't load v8 snapshot in browser process https://chromium-review.googlesource.com/c/chromium/src/+/3183394 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * 3186491: Add 'devtools.sync_preferences' preference https://chromium-review.googlesource.com/c/chromium/src/+/3186491 * 2951147: DCHECK accessible names for focusable Views https://chromium-review.googlesource.com/c/chromium/src/+/2951147 * 3201014: Use real font size for calculation of SmallTextRatio https://chromium-review.googlesource.com/c/chromium/src/+/3201014 * fixup Clipboard: Remove ReadImage path in browser * chore: update patches * fix: disable PlzServiceWorker to fix custom protocol SW script loading Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3199761 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-10-21 18:51:36 +00:00
#include "ui/gfx/codec/png_codec.h"
namespace electron {
2016-10-24 08:13:34 +00:00
namespace api {
2013-04-30 08:10:25 +00:00
ui::ClipboardBuffer Clipboard::GetClipboardBuffer(gin_helper::Arguments* args) {
std::string type;
if (args->GetNext(&type) && type == "selection")
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
return ui::ClipboardBuffer::kSelection;
else
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
return ui::ClipboardBuffer::kCopyPaste;
}
std::vector<std::u16string> Clipboard::AvailableFormats(
gin_helper::Arguments* args) {
std::vector<std::u16string> format_types;
2013-04-30 08:10:25 +00:00
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadAvailableTypes(GetClipboardBuffer(args),
/* data_dst = */ nullptr, &format_types);
return format_types;
2013-04-30 08:10:25 +00:00
}
bool Clipboard::Has(const std::string& format_string,
gin_helper::Arguments* args) {
2015-05-27 08:05:51 +00:00
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
ui::ClipboardFormatType format(
ui::ClipboardFormatType::GetType(format_string));
chore: bump chromium to 93.0.4566.0 (main) (#29980) * chore: bump chromium in DEPS to 93.0.4562.0 * chore: update patches * [base] Made Value::Take{Dict,List}() rvalue ref-qualified. https://chromium-review.googlesource.com/c/chromium/src/+/2988105 * Revert "Reland "Roll src/buildtools/third_party/libc++/trunk/ 8fa879467..79a2e924d (426 commits)"" https://chromium-review.googlesource.com/c/chromium/src/+/2995482 This reverts commit 9691d6c265f010791c37d374248559969980ec65 and 797723ec838709ddeba0c104e30727ee0b7ac8ca * Pass gfx::Insets to GetHTComponentForFrame https://chromium-review.googlesource.com/c/chromium/src/+/2984243 * chore: bump chromium in DEPS to 93.0.4563.0 * [Clipboard API] Clipboard Custom Formats implementation Part 2. https://chromium-review.googlesource.com/c/chromium/src/+/2967649 * chore: update patches * chore: bump chromium in DEPS to 93.0.4564.0 * chore: bump chromium in DEPS to 93.0.4565.0 * chore: update patches * Prevent use of base::NoDestructor for trivially-destructible types https://chromium-review.googlesource.com/c/chromium/src/+/2998672 * chore: update patches * fixup! [Clipboard API] Clipboard Custom Formats implementation Part 2. * chore: bump chromium in DEPS to 93.0.4566.0 * chore: update patches * chore: add missing header * ci: do not run clipboard tests on WOA Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-07-06 12:17:13 +00:00
if (format.GetName().empty())
chore: bump chromium to 95.0.4612.5 (main) (#30503) * chore: bump chromium in DEPS to 94.0.4604.0 * build: 3-way merge of chromium patches * chore: bump chromium in DEPS to 94.0.4605.0 * build: 3-way merge of chromium patches * 3076040: Reland Remove delete_children RemoveAllChildViews arg Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3076040 * 3069287: Remove the remaining uses and delete the deprecated API Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3069287 * 2297212: Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey() Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2297212 Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 * 3082756: Change transport_security_persister_path param to be a path to a file. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3082756 > this CL intentionally changes the name of the parameter > in the network context parameters and the order of the constructor > parameters to ensure all callers update their code to pass a full > file path rather than a path to a directory. The 'path' in this diff is already an absolute path, coming from `CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));` at https://github.com/electron/electron/blob/08ff1c2cbf73c8cfe6bca7976e3eddc3626678db/shell/browser/electron_browser_context.cc#L126 * iwyu: network::mojom::HttpRawHeaderPair * fixup! 3076040: Reland Remove delete_children RemoveAllChildViews arg Missed one. * 2999884: CodeHealth: Remove DictionaryValue::GetStringWithoutPathExpansion Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2999884 (example of replacing GetStringWithoutPathExpansion() w/FindStringKey()) Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 (removal of DictionaryValue::GetStringWithoutPathExpansion) * 3059260: Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3059260 We had both of these in a 'disable_features' list. Since these feature have been removed upstream, remove them from our disable list, too. IMPORTANT: this commit should not be backported to older branches that still have these features, because doing so would un-disable them. * 2920890: Load reroute_info from download in-progress and history db back into DownloadItem. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2920890 * 3039323: [Clipboard API] Clipboard Custom Formats implementation Part 5. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * chore: bump chromium in DEPS to 94.0.4606.0 * 3084502: Add a new PrintRasterizePdfDpi policy. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 94.0.4606.3 * chore: bump chromium in DEPS to 95.0.4608.0 * chore: bump chromium in DEPS to 95.0.4609.0 * [DevTools] Remove report_raw_headers from network::ResourceRequest https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * Remove content::WebContentsObserver::OnInterfaceRequestFromFrame https://chromium-review.googlesource.com/c/chromium/src/+/3092665 * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * Add a new PrintRasterizePdfDpi policy. https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 95.0.4609.3 * disable `use_lld` for macos * chore: update patches * Linux: use chrome_crashpad_handler instead of crashpad_handler https://chromium-review.googlesource.com/c/chromium/src/+/3054290 * chore: fix lint * Revert "[DevTools] Remove report_raw_headers from network::ResourceRequest" This reverts commit 28f4da1582d046e96cb58f3cbb590503e89dfd0d. * [DevTools] Remove report_raw_headers from network::ResourceRequest (Attempt #2) https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * DCHECK that predictor always has a non-empty NetworkIsolationKey. https://chromium-review.googlesource.com/c/chromium/src/+/3067698 * Remove --no-untrusted-code-mitigations from //content and //gin https://chromium-review.googlesource.com/c/chromium/src/+/3096585 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure https://chromium-review.googlesource.com/c/chromium/src/+/3059260 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Convert PrintManager to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3072019 * chore: bump chromium in DEPS to 95.0.4612.5 * chore: disable v8 oilpan * [Compiler] Remove untrusted code mitigations. https://chromium-review.googlesource.com/c/v8/v8/+/3045704 * Remove most FTP logic from services/network. https://chromium-review.googlesource.com/c/chromium/src/+/3076119 * Rename scale_factor.h -> resource_scale_factor.h https://chromium-review.googlesource.com/c/chromium/src/+/3057113 * [GURL -> SiteForCookies] extensions/ https://chromium-review.googlesource.com/c/chromium/src/+/3100825 * breadcrumbs: add desktop entry point https://chromium-review.googlesource.com/c/chromium/src/+/3021746 * Move args_ to private in ExtensionFunction https://chromium-review.googlesource.com/c/chromium/src/+/3076261 * chore: iwyu * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * fixup! [Compiler] Remove untrusted code mitigations. * fixup! Disable kDesktopCaptureMacV2 * Revert "chore: disable v8 oilpan" This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0. * Reland "chore: disable v8 oilpan" This reverts commit 1c252765b07a205560e7b5eed06de2605336e2d8. The previous revert was to test on which platforms did the heapsnapshot test actually fail. * [Clipboard API] Clipboard Custom Formats implementation Part 5. https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * Convert ExtensionFrameHost to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3063358 * Convert PDFWebContentsHelper to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3049751 * [Underscore Migration] Migrate ui/legacy https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093160 * chore: remove unknown permission error * chore: fix lint * chore: ignore -Wunreachable-code-return for node deps/ * fixup! chore: ignore -Wunreachable-code-return for node deps/ * fix: windows build * fix: build dependency Dependency was missed in cbeae20438be8baf03ce0e32a73563a80aeccb37 * 3108669: arm,dsp: Fix 8bpp Dct64_NEON(). https://chromium-review.googlesource.com/c/codecs/libgav1/+/3108669 * chore: revert libgav1 roll * Revert "3108669: arm,dsp: Fix 8bpp Dct64_NEON()." This reverts commit 7ed31323127aac8ba2eaff9cae6c9be9a4954f33. * Revert "chore: revert libgav1 roll" This reverts commit 084a490d298811267316c786762fe7aa91b6318d. * chore: revert clang roll * chore: Fix -Wunreachable-code-aggressive warnings in arm and arm64 code Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: mlaurencin <mlaurencin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-08-24 00:52:17 +00:00
format = ui::ClipboardFormatType::CustomPlatformType(format_string);
return clipboard->IsFormatAvailable(format, GetClipboardBuffer(args),
/* data_dst = */ nullptr);
2015-05-27 08:05:51 +00:00
}
2017-03-17 16:58:35 +00:00
std::string Clipboard::Read(const std::string& format_string) {
2013-04-30 08:10:25 +00:00
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
// Prefer raw platform format names
ui::ClipboardFormatType rawFormat(
ui::ClipboardFormatType::CustomPlatformType(format_string));
bool rawFormatAvailable = clipboard->IsFormatAvailable(
rawFormat, ui::ClipboardBuffer::kCopyPaste, /* data_dst = */ nullptr);
#if defined(OS_LINUX)
if (!rawFormatAvailable) {
rawFormatAvailable = clipboard->IsFormatAvailable(
rawFormat, ui::ClipboardBuffer::kSelection, /* data_dst = */ nullptr);
}
#endif
if (rawFormatAvailable) {
std::string data;
clipboard->ReadData(rawFormat, /* data_dst = */ nullptr, &data);
return data;
}
// Otherwise, resolve custom format names
chore: bump chromium to 95.0.4612.5 (main) (#30503) * chore: bump chromium in DEPS to 94.0.4604.0 * build: 3-way merge of chromium patches * chore: bump chromium in DEPS to 94.0.4605.0 * build: 3-way merge of chromium patches * 3076040: Reland Remove delete_children RemoveAllChildViews arg Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3076040 * 3069287: Remove the remaining uses and delete the deprecated API Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3069287 * 2297212: Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey() Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2297212 Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 * 3082756: Change transport_security_persister_path param to be a path to a file. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3082756 > this CL intentionally changes the name of the parameter > in the network context parameters and the order of the constructor > parameters to ensure all callers update their code to pass a full > file path rather than a path to a directory. The 'path' in this diff is already an absolute path, coming from `CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &path_));` at https://github.com/electron/electron/blob/08ff1c2cbf73c8cfe6bca7976e3eddc3626678db/shell/browser/electron_browser_context.cc#L126 * iwyu: network::mojom::HttpRawHeaderPair * fixup! 3076040: Reland Remove delete_children RemoveAllChildViews arg Missed one. * 2999884: CodeHealth: Remove DictionaryValue::GetStringWithoutPathExpansion Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2999884 (example of replacing GetStringWithoutPathExpansion() w/FindStringKey()) Also: https://chromium-review.googlesource.com/c/chromium/src/+/3060296 (removal of DictionaryValue::GetStringWithoutPathExpansion) * 3059260: Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3059260 We had both of these in a 'disable_features' list. Since these feature have been removed upstream, remove them from our disable list, too. IMPORTANT: this commit should not be backported to older branches that still have these features, because doing so would un-disable them. * 2920890: Load reroute_info from download in-progress and history db back into DownloadItem. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2920890 * 3039323: [Clipboard API] Clipboard Custom Formats implementation Part 5. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * chore: bump chromium in DEPS to 94.0.4606.0 * 3084502: Add a new PrintRasterizePdfDpi policy. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 94.0.4606.3 * chore: bump chromium in DEPS to 95.0.4608.0 * chore: bump chromium in DEPS to 95.0.4609.0 * [DevTools] Remove report_raw_headers from network::ResourceRequest https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * Remove content::WebContentsObserver::OnInterfaceRequestFromFrame https://chromium-review.googlesource.com/c/chromium/src/+/3092665 * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * Add a new PrintRasterizePdfDpi policy. https://chromium-review.googlesource.com/c/chromium/src/+/3084502 * chore: update patches * chore: bump chromium in DEPS to 95.0.4609.3 * disable `use_lld` for macos * chore: update patches * Linux: use chrome_crashpad_handler instead of crashpad_handler https://chromium-review.googlesource.com/c/chromium/src/+/3054290 * chore: fix lint * Revert "[DevTools] Remove report_raw_headers from network::ResourceRequest" This reverts commit 28f4da1582d046e96cb58f3cbb590503e89dfd0d. * [DevTools] Remove report_raw_headers from network::ResourceRequest (Attempt #2) https://chromium-review.googlesource.com/c/chromium/src/+/2856099 * DCHECK that predictor always has a non-empty NetworkIsolationKey. https://chromium-review.googlesource.com/c/chromium/src/+/3067698 * Remove --no-untrusted-code-mitigations from //content and //gin https://chromium-review.googlesource.com/c/chromium/src/+/3096585 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure https://chromium-review.googlesource.com/c/chromium/src/+/3059260 * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Convert PrintManager to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3072019 * chore: bump chromium in DEPS to 95.0.4612.5 * chore: disable v8 oilpan * [Compiler] Remove untrusted code mitigations. https://chromium-review.googlesource.com/c/v8/v8/+/3045704 * Remove most FTP logic from services/network. https://chromium-review.googlesource.com/c/chromium/src/+/3076119 * Rename scale_factor.h -> resource_scale_factor.h https://chromium-review.googlesource.com/c/chromium/src/+/3057113 * [GURL -> SiteForCookies] extensions/ https://chromium-review.googlesource.com/c/chromium/src/+/3100825 * breadcrumbs: add desktop entry point https://chromium-review.googlesource.com/c/chromium/src/+/3021746 * Move args_ to private in ExtensionFunction https://chromium-review.googlesource.com/c/chromium/src/+/3076261 * chore: iwyu * fixup! Remove kSameSiteByDefaultCookies and kCookiesWithoutSameSiteMustBeSecure * Disable kDesktopCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3069272 * fixup! [Compiler] Remove untrusted code mitigations. * fixup! Disable kDesktopCaptureMacV2 * Revert "chore: disable v8 oilpan" This reverts commit 5d255cf1d8e8efbb906047937a713279e5f800d0. * Reland "chore: disable v8 oilpan" This reverts commit 1c252765b07a205560e7b5eed06de2605336e2d8. The previous revert was to test on which platforms did the heapsnapshot test actually fail. * [Clipboard API] Clipboard Custom Formats implementation Part 5. https://chromium-review.googlesource.com/c/chromium/src/+/3039323 * Convert ExtensionFrameHost to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3063358 * Convert PDFWebContentsHelper to RenderFrameHostReceiverSet. https://chromium-review.googlesource.com/c/chromium/src/+/3049751 * [Underscore Migration] Migrate ui/legacy https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3093160 * chore: remove unknown permission error * chore: fix lint * chore: ignore -Wunreachable-code-return for node deps/ * fixup! chore: ignore -Wunreachable-code-return for node deps/ * fix: windows build * fix: build dependency Dependency was missed in cbeae20438be8baf03ce0e32a73563a80aeccb37 * 3108669: arm,dsp: Fix 8bpp Dct64_NEON(). https://chromium-review.googlesource.com/c/codecs/libgav1/+/3108669 * chore: revert libgav1 roll * Revert "3108669: arm,dsp: Fix 8bpp Dct64_NEON()." This reverts commit 7ed31323127aac8ba2eaff9cae6c9be9a4954f33. * Revert "chore: revert libgav1 roll" This reverts commit 084a490d298811267316c786762fe7aa91b6318d. * chore: revert clang roll * chore: Fix -Wunreachable-code-aggressive warnings in arm and arm64 code Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: mlaurencin <mlaurencin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-08-24 00:52:17 +00:00
std::map<std::string, std::string> custom_format_names;
custom_format_names =
clipboard->ExtractCustomPlatformNames(ui::ClipboardBuffer::kCopyPaste,
/* data_dst = */ nullptr);
#if defined(OS_LINUX)
if (custom_format_names.find(format_string) == custom_format_names.end()) {
custom_format_names =
clipboard->ExtractCustomPlatformNames(ui::ClipboardBuffer::kSelection,
/* data_dst = */ nullptr);
}
#endif
2013-04-30 08:10:25 +00:00
ui::ClipboardFormatType format;
if (custom_format_names.find(format_string) != custom_format_names.end()) {
format =
ui::ClipboardFormatType(ui::ClipboardFormatType::CustomPlatformType(
custom_format_names[format_string]));
} else {
format = ui::ClipboardFormatType(
ui::ClipboardFormatType::CustomPlatformType(format_string));
}
2013-04-30 08:10:25 +00:00
std::string data;
clipboard->ReadData(format, /* data_dst = */ nullptr, &data);
return data;
}
v8::Local<v8::Value> Clipboard::ReadBuffer(const std::string& format_string,
gin_helper::Arguments* args) {
std::string data = Read(format_string);
2018-04-16 19:08:17 +00:00
return node::Buffer::Copy(args->isolate(), data.data(), data.length())
.ToLocalChecked();
2017-03-16 22:42:23 +00:00
}
void Clipboard::WriteBuffer(const std::string& format,
2017-04-21 05:47:04 +00:00
const v8::Local<v8::Value> buffer,
gin_helper::Arguments* args) {
if (!node::Buffer::HasInstance(buffer)) {
args->ThrowError("buffer must be a node Buffer");
return;
}
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
base::span<const uint8_t> payload_span(
reinterpret_cast<const uint8_t*>(node::Buffer::Data(buffer)),
node::Buffer::Length(buffer));
writer.WriteUnsafeRawData(base::UTF8ToUTF16(format),
mojo_base::BigBuffer(payload_span));
2017-04-21 05:47:04 +00:00
}
void Clipboard::Write(const gin_helper::Dictionary& data,
gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
std::u16string text, html, bookmark;
gfx::Image image;
2016-06-24 22:14:28 +00:00
if (data.Get("text", &text)) {
writer.WriteText(text);
2016-06-24 22:14:28 +00:00
if (data.Get("bookmark", &bookmark))
writer.WriteBookmark(bookmark, base::UTF16ToUTF8(text));
}
if (data.Get("rtf", &text)) {
std::string rtf = base::UTF16ToUTF8(text);
writer.WriteRTF(rtf);
}
if (data.Get("html", &html))
writer.WriteHTML(html, std::string());
if (data.Get("image", &image))
writer.WriteImage(image.AsBitmap());
}
std::u16string Clipboard::ReadText(gin_helper::Arguments* args) {
std::u16string data;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
auto type = GetClipboardBuffer(args);
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::PlainTextType(),
type, /* data_dst = */ nullptr)) {
clipboard->ReadText(type, /* data_dst = */ nullptr, &data);
chore: bump chromium to 279aeeec3c9fe2237bc31f776f269 (master) (#21521) * chore: bump chromium in DEPS to 46d2d82e84d73806da623c5333dae4dd218172df * chore: bump chromium in DEPS to cbafe74731a5d1e59844ca59e0fc28f4a5f80a33 * chore: bump chromium in DEPS to d5dcd6b5cc76f4e1732083d775cdd7b533f0abe9 * Update patches * update for lint * Fix compilation errors * chore: bump chromium in DEPS to 1c19360fdaaf65d4ed006736c7f9804104095990 * Replace removed constant * chore: bump chromium in DEPS to 3b6639f5da26c1772c5d4f3ba634aca65df75fec * chore: bump chromium in DEPS to cc6b1b930d4b5eca06701820dac54fa0f41e8999 * chore: bump chromium in DEPS to 7d1445641ad1032c67f731ba6ff7798f29349ade * chore: bump chromium in DEPS to 6f7e5e79cefe982ad84a88927565a88db2e592be * chore: bump chromium in DEPS to bfb25dafff19cb41bf9781331d19ef0be819d1e4 * chore: bump chromium in DEPS to 1a8196b39f0e0cdc4935fd122fff5625d5fab06e * chore: bump chromium in DEPS to 9a03d8d2bb38ad8c0cbb9550ca81b2f94ff60c15 * chore: bump chromium in DEPS to 4c67f3505dab2d5457adb418cd3270a4f3236fd0 * chore: bump chromium in DEPS to 652394e7626fc1ae895a53fb34c64070494e648e * chore: bump chromium in DEPS to 07653652c58cc019af7f833bd63eb0c2eceaab5e * chore: bump chromium in DEPS to 451a1c5fec1fb073a5bae12a033bb342c72c905f * chore: bump chromium in DEPS to 86cdba00e233899a232868b412b333d08db63478 * chore: bump chromium in DEPS to 7c322faad1aee8abef2330d74aabf09ecf8c11af * Update patches * chore: bump chromium in DEPS to d0044fae7efc29eb201cfdd5fdbed77d48aba212 * Replace IsProcessingUserGesture with HasTransientUserActivation https://chromium.googlesource.com/chromium/src/+/4baa9a6e85e6c1784fd20d196c1c3c85fdb40101 * Fix 10.15 sdk build https://chromium.googlesource.com/chromium/src/+/0eaa6db358ca97b1cd358934068ade9a249c83db * Remove CancelPrerender https://chromium.googlesource.com/chromium/src/+/5eb33297194c3d3d6a7f2d744b3811033463194e * Remove no longer used WebFloatPoint https://chromium.googlesource.com/chromium/src/+/43ab96ce6bfc78440e5b1617a9974386a54c750c * Use base::span<const uint8_t> for devtools messages in content/public https://chromium.googlesource.com/chromium/src/+/21e19401af0b12d13ddc14d4a167f1b02ec65a6b * Update renamed header files * TODO: update with upstream changes This code needs to be updated to handle the changes made in: https://chromium.googlesource.com/chromium/src/+/19be6547a9a898104cd172de77184e243643ee19 * chore: bump chromium in DEPS to 82e5a2c6bd33c2e53634a09fbcbc9fcac1e7ff93 * chore: bump chromium in DEPS to 91f877cadd2995201c276e952b3bf2c60b226c64 * chore: bump chromium in DEPS to 43fcd2ab2677a06d38246b42761dc5b40cf87177 * chore: bump chromium in DEPS to e30957dcb710c0977a7ff95b8d3cf65843df12ca * chore: bump chromium in DEPS to 6a8335a56db12aae2fd06296f82579d804d92217 * chore: bump chromium in DEPS to a4a436cbc28ace88d71752f8f479e59559e54e46 * chore: bump chromium in DEPS to 982bbd0e4b2e1d57d515f384f6483ffc0d7073ad * chore: bump chromium in DEPS to 92bb7a99f84ffcdf41d4edca57e90b1f0c7c6c8b * update patches * add checkout_google_benchmark gclient var * FIXME: workaround grit bug * chore: bump chromium in DEPS to d3623fc53615739e6b59340a5d349e4b397cb7c5 * update patches * Remove color arg from DidChangeThemeColor(). https://chromium-review.googlesource.com/c/chromium/src/+/1982623 * update CreateFileURLLoader with new suffix CL: https://chromium-review.googlesource.com/c/chromium/src/+/1981414 * add node patch for removal of task API in v8 CL: https://chromium-review.googlesource.com/c/v8/v8/+/1868620 * add disable_secure_dns param for WillCreateURLLoaderFactory CL: https://chromium-review.googlesource.com/c/chromium/src/+/1888099 * switch to mojo-ified PrintMsg_PrintPreview CL: https://chromium-review.googlesource.com/c/chromium/src/+/1972307 * chore: bump chromium in DEPS to e7a6d173632660b6aeb9806e9132c34a315331c2 * update missing chrome/browser/ssl:proto dependency after chrome removal CL: https://chromium-review.googlesource.com/c/chromium/src/+/1986082 * chore: add libvulkan.so to the linux manifest CL: https://chromium-review.googlesource.com/c/chromium/src/+/1973042 * revert DidChangeThemeColor ternary change due to templates * match Chrome's mojo-ified implementation in geolocation_permission_context.cc CL: https://chromium-review.googlesource.com/c/chromium/src/+/1963371 * add vulkan-1.dll to zips https://github.com/KhronosGroup/Vulkan-Loader/commit/2d6f74c6d4319e94cf1fa33954c619ab4428f2b8 * add bug link to fixme_grit_conflicts.patch * Introduce device.mojom.DeviceService https://chromium-review.googlesource.com/c/chromium/src/+/1956277 * PDF Compositor rename to Print Compositor https://chromium-review.googlesource.com/c/chromium/src/+/1981135 * chore: bump chromium_version 00362ea584735b4acf4c5a0e1912d7987f8645ab * chore: update patches * Use a virtual base class to provide GetWidget(). https://chromium-review.googlesource.com/c/chromium/src/+/1996948 * [base] Remove usage of base::CurrentThread https://chromium-review.googlesource.com/c/chromium/src/+/1962019 * chore: gn format * Revert "ci: Use Visual Studio Build Tools instead of VS Studio (#21771)" This reverts commit 9c1310dadc09f88daf8866b38af9ebb385a2e9d3. * fix: trigger resize when iframe requests fullscreen * fix: Locking scheme registry is not necessary https://chromium-review.googlesource.com/c/chromium/src/+/1973198 * chore: bump chromium f707f1d6d428f84cf14b64bc2ca74372e25c6ce7 * chore: update patches * ui/base/clipboard: Remove redundant ANSI format functions https://chromium-review.googlesource.com/c/chromium/src/+/1992015 * [base] Prepare //chrome for Value::GetList() switch https://chromium-review.googlesource.com/c/chromium/src/+/1962255 Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: Robo <hop2deep@gmail.com>
2020-01-17 18:41:52 +00:00
} else {
#if defined(OS_WIN)
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::PlainTextAType(),
type,
/* data_dst = */ nullptr)) {
chore: bump chromium to 279aeeec3c9fe2237bc31f776f269 (master) (#21521) * chore: bump chromium in DEPS to 46d2d82e84d73806da623c5333dae4dd218172df * chore: bump chromium in DEPS to cbafe74731a5d1e59844ca59e0fc28f4a5f80a33 * chore: bump chromium in DEPS to d5dcd6b5cc76f4e1732083d775cdd7b533f0abe9 * Update patches * update for lint * Fix compilation errors * chore: bump chromium in DEPS to 1c19360fdaaf65d4ed006736c7f9804104095990 * Replace removed constant * chore: bump chromium in DEPS to 3b6639f5da26c1772c5d4f3ba634aca65df75fec * chore: bump chromium in DEPS to cc6b1b930d4b5eca06701820dac54fa0f41e8999 * chore: bump chromium in DEPS to 7d1445641ad1032c67f731ba6ff7798f29349ade * chore: bump chromium in DEPS to 6f7e5e79cefe982ad84a88927565a88db2e592be * chore: bump chromium in DEPS to bfb25dafff19cb41bf9781331d19ef0be819d1e4 * chore: bump chromium in DEPS to 1a8196b39f0e0cdc4935fd122fff5625d5fab06e * chore: bump chromium in DEPS to 9a03d8d2bb38ad8c0cbb9550ca81b2f94ff60c15 * chore: bump chromium in DEPS to 4c67f3505dab2d5457adb418cd3270a4f3236fd0 * chore: bump chromium in DEPS to 652394e7626fc1ae895a53fb34c64070494e648e * chore: bump chromium in DEPS to 07653652c58cc019af7f833bd63eb0c2eceaab5e * chore: bump chromium in DEPS to 451a1c5fec1fb073a5bae12a033bb342c72c905f * chore: bump chromium in DEPS to 86cdba00e233899a232868b412b333d08db63478 * chore: bump chromium in DEPS to 7c322faad1aee8abef2330d74aabf09ecf8c11af * Update patches * chore: bump chromium in DEPS to d0044fae7efc29eb201cfdd5fdbed77d48aba212 * Replace IsProcessingUserGesture with HasTransientUserActivation https://chromium.googlesource.com/chromium/src/+/4baa9a6e85e6c1784fd20d196c1c3c85fdb40101 * Fix 10.15 sdk build https://chromium.googlesource.com/chromium/src/+/0eaa6db358ca97b1cd358934068ade9a249c83db * Remove CancelPrerender https://chromium.googlesource.com/chromium/src/+/5eb33297194c3d3d6a7f2d744b3811033463194e * Remove no longer used WebFloatPoint https://chromium.googlesource.com/chromium/src/+/43ab96ce6bfc78440e5b1617a9974386a54c750c * Use base::span<const uint8_t> for devtools messages in content/public https://chromium.googlesource.com/chromium/src/+/21e19401af0b12d13ddc14d4a167f1b02ec65a6b * Update renamed header files * TODO: update with upstream changes This code needs to be updated to handle the changes made in: https://chromium.googlesource.com/chromium/src/+/19be6547a9a898104cd172de77184e243643ee19 * chore: bump chromium in DEPS to 82e5a2c6bd33c2e53634a09fbcbc9fcac1e7ff93 * chore: bump chromium in DEPS to 91f877cadd2995201c276e952b3bf2c60b226c64 * chore: bump chromium in DEPS to 43fcd2ab2677a06d38246b42761dc5b40cf87177 * chore: bump chromium in DEPS to e30957dcb710c0977a7ff95b8d3cf65843df12ca * chore: bump chromium in DEPS to 6a8335a56db12aae2fd06296f82579d804d92217 * chore: bump chromium in DEPS to a4a436cbc28ace88d71752f8f479e59559e54e46 * chore: bump chromium in DEPS to 982bbd0e4b2e1d57d515f384f6483ffc0d7073ad * chore: bump chromium in DEPS to 92bb7a99f84ffcdf41d4edca57e90b1f0c7c6c8b * update patches * add checkout_google_benchmark gclient var * FIXME: workaround grit bug * chore: bump chromium in DEPS to d3623fc53615739e6b59340a5d349e4b397cb7c5 * update patches * Remove color arg from DidChangeThemeColor(). https://chromium-review.googlesource.com/c/chromium/src/+/1982623 * update CreateFileURLLoader with new suffix CL: https://chromium-review.googlesource.com/c/chromium/src/+/1981414 * add node patch for removal of task API in v8 CL: https://chromium-review.googlesource.com/c/v8/v8/+/1868620 * add disable_secure_dns param for WillCreateURLLoaderFactory CL: https://chromium-review.googlesource.com/c/chromium/src/+/1888099 * switch to mojo-ified PrintMsg_PrintPreview CL: https://chromium-review.googlesource.com/c/chromium/src/+/1972307 * chore: bump chromium in DEPS to e7a6d173632660b6aeb9806e9132c34a315331c2 * update missing chrome/browser/ssl:proto dependency after chrome removal CL: https://chromium-review.googlesource.com/c/chromium/src/+/1986082 * chore: add libvulkan.so to the linux manifest CL: https://chromium-review.googlesource.com/c/chromium/src/+/1973042 * revert DidChangeThemeColor ternary change due to templates * match Chrome's mojo-ified implementation in geolocation_permission_context.cc CL: https://chromium-review.googlesource.com/c/chromium/src/+/1963371 * add vulkan-1.dll to zips https://github.com/KhronosGroup/Vulkan-Loader/commit/2d6f74c6d4319e94cf1fa33954c619ab4428f2b8 * add bug link to fixme_grit_conflicts.patch * Introduce device.mojom.DeviceService https://chromium-review.googlesource.com/c/chromium/src/+/1956277 * PDF Compositor rename to Print Compositor https://chromium-review.googlesource.com/c/chromium/src/+/1981135 * chore: bump chromium_version 00362ea584735b4acf4c5a0e1912d7987f8645ab * chore: update patches * Use a virtual base class to provide GetWidget(). https://chromium-review.googlesource.com/c/chromium/src/+/1996948 * [base] Remove usage of base::CurrentThread https://chromium-review.googlesource.com/c/chromium/src/+/1962019 * chore: gn format * Revert "ci: Use Visual Studio Build Tools instead of VS Studio (#21771)" This reverts commit 9c1310dadc09f88daf8866b38af9ebb385a2e9d3. * fix: trigger resize when iframe requests fullscreen * fix: Locking scheme registry is not necessary https://chromium-review.googlesource.com/c/chromium/src/+/1973198 * chore: bump chromium f707f1d6d428f84cf14b64bc2ca74372e25c6ce7 * chore: update patches * ui/base/clipboard: Remove redundant ANSI format functions https://chromium-review.googlesource.com/c/chromium/src/+/1992015 * [base] Prepare //chrome for Value::GetList() switch https://chromium-review.googlesource.com/c/chromium/src/+/1962255 Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: Robo <hop2deep@gmail.com>
2020-01-17 18:41:52 +00:00
std::string result;
clipboard->ReadAsciiText(type, /* data_dst = */ nullptr, &result);
chore: bump chromium to 279aeeec3c9fe2237bc31f776f269 (master) (#21521) * chore: bump chromium in DEPS to 46d2d82e84d73806da623c5333dae4dd218172df * chore: bump chromium in DEPS to cbafe74731a5d1e59844ca59e0fc28f4a5f80a33 * chore: bump chromium in DEPS to d5dcd6b5cc76f4e1732083d775cdd7b533f0abe9 * Update patches * update for lint * Fix compilation errors * chore: bump chromium in DEPS to 1c19360fdaaf65d4ed006736c7f9804104095990 * Replace removed constant * chore: bump chromium in DEPS to 3b6639f5da26c1772c5d4f3ba634aca65df75fec * chore: bump chromium in DEPS to cc6b1b930d4b5eca06701820dac54fa0f41e8999 * chore: bump chromium in DEPS to 7d1445641ad1032c67f731ba6ff7798f29349ade * chore: bump chromium in DEPS to 6f7e5e79cefe982ad84a88927565a88db2e592be * chore: bump chromium in DEPS to bfb25dafff19cb41bf9781331d19ef0be819d1e4 * chore: bump chromium in DEPS to 1a8196b39f0e0cdc4935fd122fff5625d5fab06e * chore: bump chromium in DEPS to 9a03d8d2bb38ad8c0cbb9550ca81b2f94ff60c15 * chore: bump chromium in DEPS to 4c67f3505dab2d5457adb418cd3270a4f3236fd0 * chore: bump chromium in DEPS to 652394e7626fc1ae895a53fb34c64070494e648e * chore: bump chromium in DEPS to 07653652c58cc019af7f833bd63eb0c2eceaab5e * chore: bump chromium in DEPS to 451a1c5fec1fb073a5bae12a033bb342c72c905f * chore: bump chromium in DEPS to 86cdba00e233899a232868b412b333d08db63478 * chore: bump chromium in DEPS to 7c322faad1aee8abef2330d74aabf09ecf8c11af * Update patches * chore: bump chromium in DEPS to d0044fae7efc29eb201cfdd5fdbed77d48aba212 * Replace IsProcessingUserGesture with HasTransientUserActivation https://chromium.googlesource.com/chromium/src/+/4baa9a6e85e6c1784fd20d196c1c3c85fdb40101 * Fix 10.15 sdk build https://chromium.googlesource.com/chromium/src/+/0eaa6db358ca97b1cd358934068ade9a249c83db * Remove CancelPrerender https://chromium.googlesource.com/chromium/src/+/5eb33297194c3d3d6a7f2d744b3811033463194e * Remove no longer used WebFloatPoint https://chromium.googlesource.com/chromium/src/+/43ab96ce6bfc78440e5b1617a9974386a54c750c * Use base::span<const uint8_t> for devtools messages in content/public https://chromium.googlesource.com/chromium/src/+/21e19401af0b12d13ddc14d4a167f1b02ec65a6b * Update renamed header files * TODO: update with upstream changes This code needs to be updated to handle the changes made in: https://chromium.googlesource.com/chromium/src/+/19be6547a9a898104cd172de77184e243643ee19 * chore: bump chromium in DEPS to 82e5a2c6bd33c2e53634a09fbcbc9fcac1e7ff93 * chore: bump chromium in DEPS to 91f877cadd2995201c276e952b3bf2c60b226c64 * chore: bump chromium in DEPS to 43fcd2ab2677a06d38246b42761dc5b40cf87177 * chore: bump chromium in DEPS to e30957dcb710c0977a7ff95b8d3cf65843df12ca * chore: bump chromium in DEPS to 6a8335a56db12aae2fd06296f82579d804d92217 * chore: bump chromium in DEPS to a4a436cbc28ace88d71752f8f479e59559e54e46 * chore: bump chromium in DEPS to 982bbd0e4b2e1d57d515f384f6483ffc0d7073ad * chore: bump chromium in DEPS to 92bb7a99f84ffcdf41d4edca57e90b1f0c7c6c8b * update patches * add checkout_google_benchmark gclient var * FIXME: workaround grit bug * chore: bump chromium in DEPS to d3623fc53615739e6b59340a5d349e4b397cb7c5 * update patches * Remove color arg from DidChangeThemeColor(). https://chromium-review.googlesource.com/c/chromium/src/+/1982623 * update CreateFileURLLoader with new suffix CL: https://chromium-review.googlesource.com/c/chromium/src/+/1981414 * add node patch for removal of task API in v8 CL: https://chromium-review.googlesource.com/c/v8/v8/+/1868620 * add disable_secure_dns param for WillCreateURLLoaderFactory CL: https://chromium-review.googlesource.com/c/chromium/src/+/1888099 * switch to mojo-ified PrintMsg_PrintPreview CL: https://chromium-review.googlesource.com/c/chromium/src/+/1972307 * chore: bump chromium in DEPS to e7a6d173632660b6aeb9806e9132c34a315331c2 * update missing chrome/browser/ssl:proto dependency after chrome removal CL: https://chromium-review.googlesource.com/c/chromium/src/+/1986082 * chore: add libvulkan.so to the linux manifest CL: https://chromium-review.googlesource.com/c/chromium/src/+/1973042 * revert DidChangeThemeColor ternary change due to templates * match Chrome's mojo-ified implementation in geolocation_permission_context.cc CL: https://chromium-review.googlesource.com/c/chromium/src/+/1963371 * add vulkan-1.dll to zips https://github.com/KhronosGroup/Vulkan-Loader/commit/2d6f74c6d4319e94cf1fa33954c619ab4428f2b8 * add bug link to fixme_grit_conflicts.patch * Introduce device.mojom.DeviceService https://chromium-review.googlesource.com/c/chromium/src/+/1956277 * PDF Compositor rename to Print Compositor https://chromium-review.googlesource.com/c/chromium/src/+/1981135 * chore: bump chromium_version 00362ea584735b4acf4c5a0e1912d7987f8645ab * chore: update patches * Use a virtual base class to provide GetWidget(). https://chromium-review.googlesource.com/c/chromium/src/+/1996948 * [base] Remove usage of base::CurrentThread https://chromium-review.googlesource.com/c/chromium/src/+/1962019 * chore: gn format * Revert "ci: Use Visual Studio Build Tools instead of VS Studio (#21771)" This reverts commit 9c1310dadc09f88daf8866b38af9ebb385a2e9d3. * fix: trigger resize when iframe requests fullscreen * fix: Locking scheme registry is not necessary https://chromium-review.googlesource.com/c/chromium/src/+/1973198 * chore: bump chromium f707f1d6d428f84cf14b64bc2ca74372e25c6ce7 * chore: update patches * ui/base/clipboard: Remove redundant ANSI format functions https://chromium-review.googlesource.com/c/chromium/src/+/1992015 * [base] Prepare //chrome for Value::GetList() switch https://chromium-review.googlesource.com/c/chromium/src/+/1962255 Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: loc <andy@slack-corp.com> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: Robo <hop2deep@gmail.com>
2020-01-17 18:41:52 +00:00
data = base::ASCIIToUTF16(result);
}
#endif
}
return data;
2013-04-30 08:10:25 +00:00
}
void Clipboard::WriteText(const std::u16string& text,
gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteText(text);
2013-04-30 08:10:25 +00:00
}
std::u16string Clipboard::ReadRTF(gin_helper::Arguments* args) {
std::string data;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadRTF(GetClipboardBuffer(args), /* data_dst = */ nullptr, &data);
return base::UTF8ToUTF16(data);
}
void Clipboard::WriteRTF(const std::string& text, gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteRTF(text);
}
std::u16string Clipboard::ReadHTML(gin_helper::Arguments* args) {
std::u16string data;
std::u16string html;
std::string url;
2016-03-08 04:40:10 +00:00
uint32_t start;
uint32_t end;
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadHTML(GetClipboardBuffer(args), /* data_dst = */ nullptr, &html,
&url, &start, &end);
data = html.substr(start, end - start);
return data;
}
void Clipboard::WriteHTML(const std::u16string& html,
gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteHTML(html, std::string());
}
v8::Local<v8::Value> Clipboard::ReadBookmark(gin_helper::Arguments* args) {
std::u16string title;
std::string url;
gin_helper::Dictionary dict =
gin_helper::Dictionary::CreateEmpty(args->isolate());
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
clipboard->ReadBookmark(/* data_dst = */ nullptr, &title, &url);
dict.Set("title", title);
dict.Set("url", url);
return dict.GetHandle();
}
void Clipboard::WriteBookmark(const std::u16string& title,
2016-10-24 08:13:34 +00:00
const std::string& url,
gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteBookmark(title, url);
}
gfx::Image Clipboard::ReadImage(gin_helper::Arguments* args) {
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
chore: bump chromium to 93.0.4530.0 (master) (#29256) * chore: bump chromium in DEPS to 92.0.4512.6 * 2887336: [CaptureHandle][#2] Propagate CaptureHandleConfig in browser process https://chromium-review.googlesource.com/c/chromium/src/+/2887336 * refactor: base::Optional -> absl::optional * chore: fixup patch indices * chore: bump chromium in DEPS to 92.0.4514.0 * 2899417: Make build work when enable_pdf is set to false. https://chromium-review.googlesource.com/c/chromium/src/+/2899417 * 2904731: use BrowserContext instead of Profile in PreconnectManager https://chromium-review.googlesource.com/c/chromium/src/+/2904731 * 2295749: fix: check IsSecureEventInputEnabled in constructor before setting SetPasswordInputEnabled to true https://chromium-review.googlesource.com/c/chromium/src/+/2295749 * 2893803: Add a GetWebView to RenderFrame. https://chromium-review.googlesource.com/c/chromium/src/+/2893803 * 2892345: Implement WebContents::ForEachRenderFrameHost https://chromium-review.googlesource.com/c/chromium/src/+/2892345 * chore: fixup patch indices * 2892048: Real instance methods for BrowserContext: remaining 5 methods. https://chromium-review.googlesource.com/c/chromium/src/+/2892048 * 2902821: [mojo] Don't require full header includes for referenced interfaces https://chromium-review.googlesource.com/c/chromium/src/+/2902821 * 2496500: Remove last deprecated extension Event ctor. https://chromium-review.googlesource.com/c/chromium/src/+/2496500 * chore: fixup malformed pepper support patch * chore: bump chromium in DEPS to 92.0.4515.0 * 2908461: Add CreateEmptyPrintPagesParamsPtr() inside print_view_manager_base.cc. https://chromium-review.googlesource.com/c/chromium/src/+/2908461 * 2880838: viz: add optional HDRMetadata to TransferableResource https://chromium-review.googlesource.com/c/chromium/src/+/2880838 * chore: fixup patch indices * chore: bump chromium in DEPS to 92.0.4515.5 * chore: update patches * chore: bump chromium in DEPS to 92.0.4515.7 * chore: bump chromium in DEPS to 92.0.4515.9 * chore: bump chromium in DEPS to 93.0.4522.0 * chore: bump chromium in DEPS to 93.0.4523.0 * chore: bump chromium in DEPS to 93.0.4524.0 * chore: update patches * chore: enable_pak_file_integrity_checks was reverted * chore: update patches * refactor: base/optional was replaced with absl::optional Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202 * refactor: replace all usages of base::nullopt with absl::nullopt Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202 * chore: add missing base::Contains include Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202 * refactor: replace all usages of base::make_optional with absl::make_optional Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202 * refactor: replace WorldScriptContext() with GetScriptContextFromWorldId Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2893213 * chore: clean up left over opening namespace Refs: https://github.com/electron/electron/commit/95bfe6d08f65471394fb3005dbfa177cdf71210a * chore: add missing base::Contains include Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2910202 * refactor: replace GetCurrentDisplayIterator with the hard checker GetCurrentDisplay This code looks suspicious but if the iterator was invalid before it will also be invalid now. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2893191 * refactor: headers are now passed directly in extensions client Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2918906 * refactor: base::DictionaryValue::empty() has been removed Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2912424 * chore: add missing includes for network URLLoaderFactory Refs: unknown, probably a side effect of header changes * refactor: make convenience wrapper around AppendArg There is no converter FromV8 for base::StringPiece (apparently its not possible). So we now take in an std::string and use the construct for StringPiece to do implicit conversion. Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2905544 * chore: add patch * chore: bump chromium in DEPS to 93.0.4525.0 * chore: update patches * refactor: CanResize has been de-virtualized Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2485774 * chore: update resource integrity patch * chore: add character encoding idl patch * chore: bump chromium in DEPS to 93.0.4526.0 * chore: update patches * chore: bump chromium in DEPS to 93.0.4527.0 * chore: bump chromium in DEPS to 93.0.4528.0 * chore: update patches * chore: update idl encoding patch * chore: bump chromium in DEPS to 93.0.4529.0 * chore: update patches * chore: bump chromium in DEPS to 93.0.4530.0 * chore: update patches * fix: only SetCanResize after the widget has been initialized * chore: add patch for vr on windows gn gen * spec: fix focus related tests on linux due to delay in focus swap * chore: remove new usages of base::Optional from main Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <sattard@slack-corp.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-06-03 08:05:04 +00:00
absl::optional<gfx::Image> image;
chore: bump chromium to 96.0.4664.4 (main) (#31317) * chore: bump chromium in DEPS to 96.0.4662.0 * chore: bump chromium in DEPS to 96.0.4663.0 * chore: update patches * [Extensions] Remove RuntimeData entirely https://chromium-review.googlesource.com/c/chromium/src/+/3177328 * Make helper macros behave consistently for //content/public UserData types https://chromium-review.googlesource.com/c/chromium/src/+/3198788 * Enabling sandboxing for the speech recognition service browser tests https://chromium-review.googlesource.com/c/chromium/src/+/3146090 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * [Reland][Extensions]: Add persistAcrossSessions flag (scripting API) https://chromium-review.googlesource.com/c/chromium/src/+/3175161 * [Bluetooth] Add Passkey prompt dialog for bonding. https://chromium-review.googlesource.com/c/chromium/src/+/2841104 * Clipboard: Remove ReadImage path in browser https://chromium-review.googlesource.com/c/chromium/src/+/3194826 * Split printing metafile code into its own target. https://chromium-review.googlesource.com/c/chromium/src/+/3164925 * Cleanup unused DesktopMediaListObserver params https://chromium-review.googlesource.com/c/chromium/src/+/3179203 * Remove base::DictionaryValue::GetBinary https://chromium-review.googlesource.com/c/chromium/src/+/3201974 * Window Placement: change RWHV::GetDisplayList to GetScreenInfos https://chromium-review.googlesource.com/c/chromium/src/+/3138774 * Add a preview to the Tab Capture picker dialog https://chromium-review.googlesource.com/c/chromium/src/+/3045268 * Add service-based usage to update print settings https://chromium-review.googlesource.com/c/chromium/src/+/3155426 * chore: bump chromium in DEPS to 96.0.4664.2 * chore: update patches * chore: bump chromium in DEPS to 96.0.4664.4 * chore: update patches * chore: bump chromium in DEPS to 97.0.4666.0 * Revert "chore: bump chromium in DEPS to 97.0.4666.0" This reverts commit d73caae8ba4b39efc9b3ea4de52685b9c92ef3d0. * Reland "Block external protocol handler with sandbox." https://chromium-review.googlesource.com/c/chromium/src/+/3198263 * fixup for lint * Add CookiePartitionKeychain parameter to CookeManager.GetCookieList. https://chromium-review.googlesource.com/c/chromium/src/+/3206016 * Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry https://chromium-review.googlesource.com/c/chromium/src/+/3200392 * fixup Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry * ozone: //chrome/browser clean up from USE_X11 https://chromium-review.googlesource.com/c/chromium/src/+/3186490 * content: don't load v8 snapshot in browser process https://chromium-review.googlesource.com/c/chromium/src/+/3183394 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * 3186491: Add 'devtools.sync_preferences' preference https://chromium-review.googlesource.com/c/chromium/src/+/3186491 * 2951147: DCHECK accessible names for focusable Views https://chromium-review.googlesource.com/c/chromium/src/+/2951147 * 3201014: Use real font size for calculation of SmallTextRatio https://chromium-review.googlesource.com/c/chromium/src/+/3201014 * fixup Clipboard: Remove ReadImage path in browser * chore: update patches * fix: disable PlzServiceWorker to fix custom protocol SW script loading Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3199761 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-10-21 18:51:36 +00:00
clipboard->ReadPng(
GetClipboardBuffer(args),
/* data_dst = */ nullptr,
base::BindOnce(
chore: bump chromium to 96.0.4664.4 (main) (#31317) * chore: bump chromium in DEPS to 96.0.4662.0 * chore: bump chromium in DEPS to 96.0.4663.0 * chore: update patches * [Extensions] Remove RuntimeData entirely https://chromium-review.googlesource.com/c/chromium/src/+/3177328 * Make helper macros behave consistently for //content/public UserData types https://chromium-review.googlesource.com/c/chromium/src/+/3198788 * Enabling sandboxing for the speech recognition service browser tests https://chromium-review.googlesource.com/c/chromium/src/+/3146090 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * [Reland][Extensions]: Add persistAcrossSessions flag (scripting API) https://chromium-review.googlesource.com/c/chromium/src/+/3175161 * [Bluetooth] Add Passkey prompt dialog for bonding. https://chromium-review.googlesource.com/c/chromium/src/+/2841104 * Clipboard: Remove ReadImage path in browser https://chromium-review.googlesource.com/c/chromium/src/+/3194826 * Split printing metafile code into its own target. https://chromium-review.googlesource.com/c/chromium/src/+/3164925 * Cleanup unused DesktopMediaListObserver params https://chromium-review.googlesource.com/c/chromium/src/+/3179203 * Remove base::DictionaryValue::GetBinary https://chromium-review.googlesource.com/c/chromium/src/+/3201974 * Window Placement: change RWHV::GetDisplayList to GetScreenInfos https://chromium-review.googlesource.com/c/chromium/src/+/3138774 * Add a preview to the Tab Capture picker dialog https://chromium-review.googlesource.com/c/chromium/src/+/3045268 * Add service-based usage to update print settings https://chromium-review.googlesource.com/c/chromium/src/+/3155426 * chore: bump chromium in DEPS to 96.0.4664.2 * chore: update patches * chore: bump chromium in DEPS to 96.0.4664.4 * chore: update patches * chore: bump chromium in DEPS to 97.0.4666.0 * Revert "chore: bump chromium in DEPS to 97.0.4666.0" This reverts commit d73caae8ba4b39efc9b3ea4de52685b9c92ef3d0. * Reland "Block external protocol handler with sandbox." https://chromium-review.googlesource.com/c/chromium/src/+/3198263 * fixup for lint * Add CookiePartitionKeychain parameter to CookeManager.GetCookieList. https://chromium-review.googlesource.com/c/chromium/src/+/3206016 * Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry https://chromium-review.googlesource.com/c/chromium/src/+/3200392 * fixup Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry * ozone: //chrome/browser clean up from USE_X11 https://chromium-review.googlesource.com/c/chromium/src/+/3186490 * content: don't load v8 snapshot in browser process https://chromium-review.googlesource.com/c/chromium/src/+/3183394 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * 3186491: Add 'devtools.sync_preferences' preference https://chromium-review.googlesource.com/c/chromium/src/+/3186491 * 2951147: DCHECK accessible names for focusable Views https://chromium-review.googlesource.com/c/chromium/src/+/2951147 * 3201014: Use real font size for calculation of SmallTextRatio https://chromium-review.googlesource.com/c/chromium/src/+/3201014 * fixup Clipboard: Remove ReadImage path in browser * chore: update patches * fix: disable PlzServiceWorker to fix custom protocol SW script loading Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3199761 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-10-21 18:51:36 +00:00
[](absl::optional<gfx::Image>* image,
const std::vector<uint8_t>& result) {
SkBitmap bitmap;
gfx::PNGCodec::Decode(result.data(), result.size(), &bitmap);
image->emplace(gfx::Image::CreateFrom1xBitmap(bitmap));
},
&image));
DCHECK(image.has_value());
return image.value();
2015-02-11 06:55:44 +00:00
}
void Clipboard::WriteImage(const gfx::Image& image,
gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
SkBitmap orig = image.AsBitmap();
SkBitmap bmp;
2018-04-16 16:14:35 +00:00
if (bmp.tryAllocPixels(orig.info()) &&
2018-04-16 19:08:17 +00:00
orig.readPixels(bmp.info(), bmp.getPixels(), bmp.rowBytes(), 0, 0)) {
2018-04-16 16:14:35 +00:00
writer.WriteImage(bmp);
}
2015-03-26 04:54:15 +00:00
}
chore: bump chromium to 0e4ca9c0a63d7a39bd910997ad4c6 (master) (#24687) * chore: bump chromium in DEPS to 1f1c4d91f6eaa4a033ec8f499d63a0717f79a42a * viz: Do not apply white level scaling for RGBA fp16 HDR video https://chromium-review.googlesource.com/c/chromium/src/+/2296006 * Move WebPreferences to WebContents https://chromium-review.googlesource.com/c/chromium/src/+/2263635 * Fix missing WeakPtr check in PreconnectManager https://chromium-review.googlesource.com/c/chromium/src/+/2309029 * Fixup swiftshader roll revision * Update patch indices * Move WebDeviceEmulationParams into common. https://chromium-review.googlesource.com/c/chromium/src/+/2303356 * Move EnableDisableDeviceEmulation to blink mojom messages https://chromium-review.googlesource.com/c/chromium/src/+/2303367 * PDF Viewer: Remove flag for two-up view https://chromium-review.googlesource.com/c/chromium/src/+/2311130 * Add mojom definition for DeviceEmulationParams. https://chromium-review.googlesource.com/c/chromium/src/+/2303491 * Remove ServiceWorkerContextWatcher from PaymentAppInstaller https://chromium-review.googlesource.com/c/chromium/src/+/2291186 * Loader: Move transferrable_url_loader.mojom into blink's mojom directory https://chromium-review.googlesource.com/c/chromium/src/+/2306123 * chore: bump chromium in DEPS to 4974f436479739025a90ebc2cc2e36d67ee1ac46 * mac: Work around Xcode 12b3 SDK bug https://chromium-review.googlesource.com/c/chromium/src/+/2315078 * Reland Update core items for macOS Big Sur. https://chromium-review.googlesource.com/c/chromium/src/+/2315162 * Update Swiftshader revision * mac/arm64: When cross-building the snapshot, use page size of the target ISA instead of the host. https://chromium-review.googlesource.com/c/v8/v8/+/2310575 * Update patch indices * Rename {,Non}ClientView::CanClose() to OnWindowCloseRequested() https://chromium-review.googlesource.com/c/chromium/src/+/2247838 * chore: bump chromium in DEPS to e9465d70d1dea539400f0fddad43358ea3c31d71 * chore: bump chromium in DEPS to bd5b71c5f20288eb26068a39ae6e0579566a51c5 * chore: bump chromium in DEPS to 786ee543048bd07d07c5ac50b7dbbdd6bdd8dcce * chore: bump chromium in DEPS to 34eb6ecbf2c5894b648900bf771a2a29de204798 * chore: bump chromium in DEPS to 567ff038d68e3adb8116a01eec863cdf34d775f5 * chore: bump chromium in DEPS to 340b45c8d4ceb2dd61969fc34e1928d3c46db48c * chore: update patches * chore: base::DeleteFile with two params is removed Should use base::DeleteFile and base::DeletePathRecursively when appropriate Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2313376 * chore: add patch for NodePlatform::PostJob impl * chore: update patches * chore: extension file access is now instrumented Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2209995 * chore: implement SetWindowFrameInScreen in OSR RWHV Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2321409 * chore: NotifyUserActivation requires a type now This is just for a histogram thing and therefore it does not matter what we pass in Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2281303 * chore: update patches * chore: bump chromium in DEPS to cd570e6dd3dcb84463ac252b04e92ceb02d8400c * chore: update patches * chore: bump chromium in DEPS to 0187908a31866992b90c59719ac1d016328f6ee0 * chore: bump chromium in DEPS to 3c9df38c508f3dba26a75248beed4882ddfb98e9 * chore: bump chromium in DEPS to 1a47d3b9cee710bd3c958c4f2d8b205710df9d50 * chore: bump chromium in DEPS to baac93040d96abdab72d46dd034c60f86e108702 * chore: bump chromium in DEPS to 13836145f97299e636491de38064b78861c4fb2e * update patches * change OS_MACOSX -> OS_MAC Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=1105907 * patch: add header for ToExecutionContext in WebMessagePortConverter * chore: bump chromium in DEPS to 91ab9b6ac5d04dc034a03ad847fbfa8261328c2b * update patches * NeedToFireBeforeUnloadOrUnload -> NeedToFireBeforeUnloadOrUnloadEvents Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2288711 * chore: bump chromium in DEPS to 290deb11f0e30cb1382fd8f8793d340560283c23 * update patches * add dragdrop header for autofill popup * int -> x11::Time * patch out accessibility private API use Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2330812 * remove usage of XEvent Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2317767 * trigger recalculation of WebPreferences before renderer initialization Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2263635 * chore: bump chromium in DEPS to 6bdb484583b99c96ef3388d0c2184326581b2d5a * chore: bump chromium in DEPS to 1eb2a79cde04fd5c8ae51b4d813e6521635269e5 * chore: bump chromium in DEPS to 3dc8e3c0f400e4ca9c0a63d7a39bd910997ad4c6 * chore: update patches * fixup! trigger recalculation of WebPreferences before renderer initialization * views: Make MenuButton and RadioButton default constructible https://chromium-review.googlesource.com/c/chromium/src/+/2339586 * chore: fix code style Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <sattard@slack-corp.com> Co-authored-by: Andy Locascio <andy@slack-corp.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2020-08-12 18:33:58 +00:00
#if !defined(OS_MAC)
void Clipboard::WriteFindText(const std::u16string& text) {}
std::u16string Clipboard::ReadFindText() {
return std::u16string();
2018-04-16 19:08:17 +00:00
}
2016-10-24 08:13:34 +00:00
#endif
void Clipboard::Clear(gin_helper::Arguments* args) {
chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792) * chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd * chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484 * chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5 * chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9 * update disable-redraw-lock.patch https://chromium-review.googlesource.com/c/chromium/src/+/1600387 * update desktop_media_list.patch https://chromium-review.googlesource.com/c/chromium/src/+/1729156 * update notification_provenance.patch https://chromium-review.googlesource.com/c/chromium/src/+/1742779 * update printing.patch https://chromium-review.googlesource.com/c/chromium/src/+/1646772 * update verbose_generate_bpad_syms.patch https://chromium-review.googlesource.com/c/chromium/src/+/1745986 * update patch metadata * remove printing_compositor manifests https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * update for URLLoaderFactoryType enum https://chromium-review.googlesource.com/c/chromium/src/+/1754716 * remove gin string16 converter https://chromium-review.googlesource.com/c/chromium/src/+/1750093 * ClearCompositorFrame() has been removed https://chromium-review.googlesource.com/c/chromium/src/+/1746301 * message_loop -> message_loop_current https://chromium-review.googlesource.com/c/chromium/src/+/1738552 * include resource_response header * pdf compositor no longer uses service manager https://chromium-review.googlesource.com/c/chromium/src/+/1742734 * chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1 * pane focus fns aren't pure virtual anymore https://chromium-review.googlesource.com/c/chromium/src/+/1708767 * fix: make std::hash value-non-const broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202 * update swiftshader in zip_manifests https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911 * address feedback from @deepak1556 * don't enable kLegacyWindowsDWriteFontFallback https://chromium-review.googlesource.com/c/chromium/src/+/1753006 * chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e * update printing.patch remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182 * convert CookieChangeListener to new Mojo types https://chromium-review.googlesource.com/c/chromium/src/+/1753371 * rename ui::ClipboardType -> ui::ClipboardBuffer https://chromium-review.googlesource.com/c/chromium/src/+/1758730 * logging::LoggingSettings log_file -> log_file_path https://chromium-review.googlesource.com/c/chromium/src/+/1699477 * roll DEPS to latest lkgr * fix: override GetFontLookupTableCacheDir() When Chromium goes to use its fallback font table creation code paths, it creates the cache directory it uses by calling GetFontLookupTableCacheDir() with a path that doesn't exist in Electron. To ensure that a legitimate file path is created, we need to override it with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA. * chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155 * update pthread_fchdir patch https://chromium-review.googlesource.com/c/chromium/src/+/1759149 * update printing patch * update cookie usage and fn signatures https://chromium-review.googlesource.com/c/chromium/src/+/1758437 * chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e * remove fix_make_std_hash_value-non-const.patch https://chromium-review.googlesource.com/c/chromium/src/+/1762335 * Convert enum to enum class for FocusManager::FocusChangeReason https://chromium-review.googlesource.com/c/chromium/src/+/1767281 * roll DEPS to latest lkgr * update dom_storage_limits.patch https://chromium-review.googlesource.com/c/chromium/src/+/1767556
2019-08-24 01:14:23 +00:00
ui::Clipboard::GetForCurrentThread()->Clear(GetClipboardBuffer(args));
2013-04-30 08:10:25 +00:00
}
2016-10-24 08:13:34 +00:00
} // namespace api
} // namespace electron
2016-10-24 08:13:34 +00:00
namespace {
2018-04-16 19:08:17 +00:00
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
gin_helper::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("availableFormats",
&electron::api::Clipboard::AvailableFormats);
dict.SetMethod("has", &electron::api::Clipboard::Has);
dict.SetMethod("read", &electron::api::Clipboard::Read);
dict.SetMethod("write", &electron::api::Clipboard::Write);
dict.SetMethod("readText", &electron::api::Clipboard::ReadText);
dict.SetMethod("writeText", &electron::api::Clipboard::WriteText);
dict.SetMethod("readRTF", &electron::api::Clipboard::ReadRTF);
dict.SetMethod("writeRTF", &electron::api::Clipboard::WriteRTF);
dict.SetMethod("readHTML", &electron::api::Clipboard::ReadHTML);
dict.SetMethod("writeHTML", &electron::api::Clipboard::WriteHTML);
dict.SetMethod("readBookmark", &electron::api::Clipboard::ReadBookmark);
dict.SetMethod("writeBookmark", &electron::api::Clipboard::WriteBookmark);
dict.SetMethod("readImage", &electron::api::Clipboard::ReadImage);
dict.SetMethod("writeImage", &electron::api::Clipboard::WriteImage);
dict.SetMethod("readFindText", &electron::api::Clipboard::ReadFindText);
dict.SetMethod("writeFindText", &electron::api::Clipboard::WriteFindText);
dict.SetMethod("readBuffer", &electron::api::Clipboard::ReadBuffer);
dict.SetMethod("writeBuffer", &electron::api::Clipboard::WriteBuffer);
dict.SetMethod("clear", &electron::api::Clipboard::Clear);
2013-04-30 08:10:25 +00:00
}
} // namespace
2013-04-30 08:10:25 +00:00
NODE_LINKED_MODULE_CONTEXT_AWARE(electron_common_clipboard, Initialize)