chore: bump chromium to f5b345dd470f14eef6e44732ccf23 (master) (#20649)
This commit is contained in:
parent
fb8b1fd1c9
commit
b6246dcf12
154 changed files with 1490 additions and 1197 deletions
|
@ -68,9 +68,12 @@ void Clipboard::WriteBuffer(const std::string& format,
|
|||
}
|
||||
|
||||
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.WriteData(
|
||||
ui::ClipboardFormatType::GetType(format).Serialize(),
|
||||
std::string(node::Buffer::Data(buffer), node::Buffer::Length(buffer)));
|
||||
base::UTF8ToUTF16(ui::ClipboardFormatType::GetType(format).Serialize()),
|
||||
mojo_base::BigBuffer(payload_span));
|
||||
}
|
||||
|
||||
void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "electron/shell/common/api/api.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/associated_remote.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -37,10 +38,10 @@ RemoteCallbackFreer::~RemoteCallbackFreer() = default;
|
|||
void RemoteCallbackFreer::RunDestructor() {
|
||||
auto* frame_host = web_contents()->GetMainFrame();
|
||||
if (frame_host) {
|
||||
mojom::ElectronRendererAssociatedPtr electron_ptr;
|
||||
mojo::AssociatedRemote<mojom::ElectronRenderer> electron_renderer;
|
||||
frame_host->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
mojo::MakeRequest(&electron_ptr));
|
||||
electron_ptr->DereferenceRemoteJSCallback(context_id_, object_id_);
|
||||
&electron_renderer);
|
||||
electron_renderer->DereferenceRemoteJSCallback(context_id_, object_id_);
|
||||
}
|
||||
|
||||
Observe(nullptr);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "electron/shell/common/api/api.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/associated_remote.h"
|
||||
#include "shell/browser/ui/inspectable_web_contents_impl.h"
|
||||
#include "shell/common/atom_constants.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
|
@ -129,10 +130,10 @@ void CrashReporterWin::UpdatePipeName() {
|
|||
if (!frame_host)
|
||||
continue;
|
||||
|
||||
electron::mojom::ElectronRendererAssociatedPtr electron_ptr;
|
||||
mojo::AssociatedRemote<electron::mojom::ElectronRenderer> electron_renderer;
|
||||
frame_host->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
mojo::MakeRequest(&electron_ptr));
|
||||
electron_ptr->UpdateCrashpadPipeName(pipe_name);
|
||||
&electron_renderer);
|
||||
electron_renderer->UpdateCrashpadPipeName(pipe_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -261,13 +261,21 @@ bool Converter<blink::WebMouseWheelEvent>::FromV8(
|
|||
dict.Get("wheelTicksY", &out->wheel_ticks_y);
|
||||
dict.Get("accelerationRatioX", &out->acceleration_ratio_x);
|
||||
dict.Get("accelerationRatioY", &out->acceleration_ratio_y);
|
||||
dict.Get("hasPreciseScrollingDeltas", &out->has_precise_scrolling_deltas);
|
||||
|
||||
bool has_precise_scrolling_deltas = false;
|
||||
dict.Get("hasPreciseScrollingDeltas", &has_precise_scrolling_deltas);
|
||||
if (has_precise_scrolling_deltas) {
|
||||
out->delta_units =
|
||||
ui::input_types::ScrollGranularity::kScrollByPrecisePixel;
|
||||
} else {
|
||||
out->delta_units = ui::input_types::ScrollGranularity::kScrollByPixel;
|
||||
}
|
||||
|
||||
#if defined(USE_AURA)
|
||||
// Matches the behavior of ui/events/blink/web_input_event_traits.cc:
|
||||
bool can_scroll = true;
|
||||
if (dict.Get("canScroll", &can_scroll) && !can_scroll) {
|
||||
out->has_precise_scrolling_deltas = false;
|
||||
out->delta_units = ui::input_types::ScrollGranularity::kScrollByPage;
|
||||
out->SetModifiers(out->GetModifiers() & ~blink::WebInputEvent::kControlKey);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -127,17 +127,7 @@ void Beep() {
|
|||
}
|
||||
|
||||
bool GetDesktopName(std::string* setme) {
|
||||
bool found = false;
|
||||
|
||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
std::string desktop_id = libgtkui::GetDesktopName(env.get());
|
||||
constexpr char const* libcc_default_id = "chromium-browser.desktop";
|
||||
if (!desktop_id.empty() && (desktop_id != libcc_default_id)) {
|
||||
*setme = desktop_id;
|
||||
found = true;
|
||||
}
|
||||
|
||||
return found;
|
||||
return base::Environment::Create()->GetVar("CHROME_DESKTOP", setme);
|
||||
}
|
||||
|
||||
} // namespace platform_util
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue