chore: bump chromium to 109.0.5382.0 (main) (#36057)
* chore: bump chromium in DEPS to 109.0.5364.0 * chore: update patches * chore: bump chromium in DEPS to 109.0.5366.0 * chore: update patches * i3940364: Change PermissionType::WINDOW_PLACEMENT to WINDOW_MANAGEMENT3940364
* 3866812: Change content::PluginList to only run on the UI thread.3866812
* chore: bump chromium in DEPS to 109.0.5368.0 * [cleanup] Replace enable_basic_printing with enable_printing3957357
* chore: update patches * 3956318: Desktop PWAs: Retire kWebAppWindowControlsOverlay flag3956318
* fixup! Change content::PluginList to only run on the UI thread. (cherry picked from commit 7b5ec87d4ff5d34e7493b4fb46c40c0afeef2005) Co-Authored-By: Robo <hop2deep@gmail.com> * chore: bump chromium in DEPS to 109.0.5370.0 * 3956299: Quota: Cleanup QuotaPermissionContext3956299
* chore: update patches * 3803867: Add Mojo interface to parse XML for OOP printer capabilities3803867
* fixup: Add Mojo interface to parse XML for OOP printer capabilities * chore: bump chromium in DEPS to 109.0.5372.0 * chore: update patches * chore: bump chromium in DEPS to 109.0.5374.0 * chore: bump chromium in DEPS to 109.0.5376.0 * chore: bump chromium in DEPS to 109.0.5378.0 * chore: update patches * Quota: Cleanup kPersistent in BrowsingDataRemover3964859
* 3955976: serial: Create DOMException with V8ThrowDOMException3955976
* 3758405: Append trailer data to serialized messages.3758405
* chore: revert clang roll This patch reverts3967491
because that roll breaks the WOA build: https://crbug.com/1377819 * chore: update patches * chore: bump chromium in DEPS to 109.0.5380.0 * chore: update patches * 3859750: [linux/wayland] Added plumbing for the state of tiled edges.3859750
Also 3970920: [linux/wayland] Fixed the tiled edges for the GTK frame.3970920
* chore: bump chromium in DEPS to 109.0.5382.0 * chore: update patches * chore: revert Use accessibility.pkey when setting page access.3949281
breaks our Linux builds run under Docker. This patch should be removed once3949284
is merged. * 3976312: Roll clang llvmorg-16-init-8189-g97196a2d-2 : llvmorg-16-init-8697-g60809cd2-13976312
* 3967841: [heap] Remove AllocationSpace::MAP_SPACE enum constant3967841
* 3956131: [cleanup] Remove flag for Wasm threads & atomics3956131
* chore: update docs for Quota: Cleanup kPersistent in BrowsingDataRemover3964859
* test: fixup HID test for ARM CI Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
This commit is contained in:
parent
07530f8e37
commit
ea6f873f97
101 changed files with 730 additions and 469 deletions
|
@ -43,7 +43,6 @@
|
|||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
#include "content/public/browser/plugin_service.h"
|
||||
#include "content/public/common/content_plugin_info.h"
|
||||
#include "ppapi/shared_impl/ppapi_permissions.h"
|
||||
#include "ppapi/shared_impl/ppapi_switches.h" // nogncheck crbug.com/1125897
|
||||
|
@ -121,20 +120,6 @@ void ComputeBuiltInPlugins(std::vector<content::ContentPluginInfo>* plugins) {
|
|||
"Portable Document Format");
|
||||
pdf_info.mime_types.push_back(pdf_mime_type);
|
||||
plugins->push_back(pdf_info);
|
||||
|
||||
// NB. in Chrome, this plugin isn't registered until the PDF extension is
|
||||
// loaded. However, in Electron, we load the PDF extension unconditionally
|
||||
// when it is enabled in the build, so we're OK to load the plugin eagerly
|
||||
// here.
|
||||
content::WebPluginInfo info;
|
||||
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
|
||||
info.name = base::ASCIIToUTF16(kPDFExtensionPluginName);
|
||||
// This isn't a real file path; it's just used as a unique identifier.
|
||||
info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId);
|
||||
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
|
||||
info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format");
|
||||
content::PluginService::GetInstance()->RefreshPlugins();
|
||||
content::PluginService::GetInstance()->RegisterInternalPlugin(info, true);
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||
|
|
|
@ -73,17 +73,6 @@ BrowserWindow::BrowserWindow(gin::Arguments* args,
|
|||
web_preferences.Set(options::kShow, show);
|
||||
}
|
||||
|
||||
bool titleBarOverlay = false;
|
||||
options.Get(options::ktitleBarOverlay, &titleBarOverlay);
|
||||
if (titleBarOverlay) {
|
||||
std::string enabled_features = "";
|
||||
if (web_preferences.Get(options::kEnableBlinkFeatures, &enabled_features)) {
|
||||
enabled_features += ",";
|
||||
}
|
||||
enabled_features += features::kWebAppWindowControlsOverlay.name;
|
||||
web_preferences.Set(options::kEnableBlinkFeatures, enabled_features);
|
||||
}
|
||||
|
||||
// Copy the webContents option to webPreferences.
|
||||
v8::Local<v8::Value> value;
|
||||
if (options.Get("webContents", &value)) {
|
||||
|
|
|
@ -138,8 +138,6 @@ uint32_t GetQuotaMask(const std::vector<std::string>& quota_types) {
|
|||
auto type = base::ToLowerASCII(it);
|
||||
if (type == "temporary")
|
||||
quota_mask |= StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY;
|
||||
else if (type == "persistent")
|
||||
quota_mask |= StoragePartition::QUOTA_MANAGED_STORAGE_MASK_PERSISTENT;
|
||||
else if (type == "syncable")
|
||||
quota_mask |= StoragePartition::QUOTA_MANAGED_STORAGE_MASK_SYNCABLE;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_navigation_throttle.h"
|
||||
#include "shell/browser/electron_quota_permission_context.h"
|
||||
#include "shell/browser/electron_speech_recognition_manager_delegate.h"
|
||||
#include "shell/browser/electron_web_contents_utility_handler_impl.h"
|
||||
#include "shell/browser/font_defaults.h"
|
||||
|
@ -603,11 +602,6 @@ std::string ElectronBrowserClient::GetGeolocationApiKey() {
|
|||
return api_key;
|
||||
}
|
||||
|
||||
scoped_refptr<content::QuotaPermissionContext>
|
||||
ElectronBrowserClient::CreateQuotaPermissionContext() {
|
||||
return base::MakeRefCounted<ElectronQuotaPermissionContext>();
|
||||
}
|
||||
|
||||
content::GeneratedCodeCacheSettings
|
||||
ElectronBrowserClient::GetGeneratedCodeCacheSettings(
|
||||
content::BrowserContext* context) {
|
||||
|
|
|
@ -125,8 +125,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
int child_process_id) override;
|
||||
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
|
||||
std::string GetGeolocationApiKey() override;
|
||||
scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext()
|
||||
override;
|
||||
content::GeneratedCodeCacheSettings GetGeneratedCodeCacheSettings(
|
||||
content::BrowserContext* context) override;
|
||||
void AllowCertificateError(
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
|
@ -117,6 +118,11 @@
|
|||
#include "chrome/browser/spellchecker/spellcheck_factory.h" // nogncheck
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
#include "content/public/browser/plugin_service.h"
|
||||
#include "shell/common/plugin_info.h"
|
||||
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
@ -390,6 +396,18 @@ void ElectronBrowserMainParts::PostCreateThreads() {
|
|||
content::GetIOThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(&tracing::TracingSamplerProfiler::CreateOnChildThread));
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
// PluginService can only be used on the UI thread
|
||||
// and ContentClient::AddPlugins gets called for both browser and render
|
||||
// process where the latter will not have UI thread which leads to DCHECK.
|
||||
// Separate the WebPluginInfo registration for these processes.
|
||||
std::vector<content::WebPluginInfo> plugins;
|
||||
auto* plugin_service = content::PluginService::GetInstance();
|
||||
plugin_service->RefreshPlugins();
|
||||
GetInternalPlugins(&plugins);
|
||||
for (const auto& plugin : plugins)
|
||||
plugin_service->RegisterInternalPlugin(plugin, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ElectronBrowserMainParts::PostDestroyThreads() {
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/electron_quota_permission_context.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "content/public/common/storage_quota_params.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
ElectronQuotaPermissionContext::ElectronQuotaPermissionContext() = default;
|
||||
|
||||
ElectronQuotaPermissionContext::~ElectronQuotaPermissionContext() = default;
|
||||
|
||||
void ElectronQuotaPermissionContext::RequestQuotaPermission(
|
||||
const content::StorageQuotaParams& params,
|
||||
int render_process_id,
|
||||
PermissionCallback callback) {
|
||||
std::move(callback).Run(response::QUOTA_PERMISSION_RESPONSE_ALLOW);
|
||||
}
|
||||
|
||||
} // namespace electron
|
|
@ -1,39 +0,0 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|
||||
#define ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|
||||
|
||||
#include "content/public/browser/quota_permission_context.h"
|
||||
|
||||
namespace content {
|
||||
struct StorageQuotaParams;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
class ElectronQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||
public:
|
||||
typedef content::QuotaPermissionContext::QuotaPermissionResponse response;
|
||||
|
||||
ElectronQuotaPermissionContext();
|
||||
|
||||
// disable copy
|
||||
ElectronQuotaPermissionContext(const ElectronQuotaPermissionContext&) =
|
||||
delete;
|
||||
ElectronQuotaPermissionContext& operator=(
|
||||
const ElectronQuotaPermissionContext&) = delete;
|
||||
|
||||
// content::QuotaPermissionContext:
|
||||
void RequestQuotaPermission(const content::StorageQuotaParams& params,
|
||||
int render_process_id,
|
||||
PermissionCallback callback) override;
|
||||
|
||||
private:
|
||||
~ElectronQuotaPermissionContext() override;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_
|
|
@ -78,6 +78,14 @@ void ElectronDesktopWindowTreeHostLinux::OnWindowStateChanged(
|
|||
UpdateWindowState(new_state);
|
||||
}
|
||||
|
||||
void ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(
|
||||
ui::WindowTiledEdges new_tiled_edges) {
|
||||
static_cast<ClientFrameViewLinux*>(
|
||||
native_window_view_->widget()->non_client_view()->frame_view())
|
||||
->set_tiled_edges(new_tiled_edges);
|
||||
UpdateFrameHints();
|
||||
}
|
||||
|
||||
void ElectronDesktopWindowTreeHostLinux::UpdateWindowState(
|
||||
ui::PlatformWindowState new_state) {
|
||||
if (window_state_ == new_state)
|
||||
|
@ -159,7 +167,15 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
|
|||
|
||||
input_insets = view->GetInputInsets();
|
||||
}
|
||||
|
||||
const auto tiled_edges = view->tiled_edges();
|
||||
if (tiled_edges.left)
|
||||
insets.set_left(0);
|
||||
if (tiled_edges.right)
|
||||
insets.set_right(0);
|
||||
if (tiled_edges.top)
|
||||
insets.set_top(0);
|
||||
if (tiled_edges.bottom)
|
||||
insets.set_bottom(0);
|
||||
gfx::Insets scaled_insets = gfx::ScaleToCeiledInsets(insets, scale);
|
||||
window->SetDecorationInsets(&scaled_insets);
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ class ElectronDesktopWindowTreeHostLinux
|
|||
void OnBoundsChanged(const BoundsChange& change) override;
|
||||
void OnWindowStateChanged(ui::PlatformWindowState old_state,
|
||||
ui::PlatformWindowState new_state) override;
|
||||
void OnWindowTiledStateChanged(ui::WindowTiledEdges new_tiled_edges) override;
|
||||
|
||||
// ui::NativeThemeObserver:
|
||||
void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
|
||||
|
|
|
@ -295,7 +295,7 @@ void ClientFrameViewLinux::OnPaint(gfx::Canvas* canvas) {
|
|||
if (!frame_->IsFullscreen()) {
|
||||
frame_provider_->PaintWindowFrame(canvas, GetLocalBounds(),
|
||||
GetTitlebarBounds().bottom(),
|
||||
ShouldPaintAsActive());
|
||||
ShouldPaintAsActive(), tiled_edges());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "base/scoped_observation.h"
|
||||
#include "shell/browser/ui/views/frameless_view.h"
|
||||
#include "ui/base/ui_base_types.h"
|
||||
#include "ui/linux/linux_ui.h"
|
||||
#include "ui/linux/nav_button_provider.h"
|
||||
#include "ui/linux/window_button_order_observer.h"
|
||||
|
@ -39,6 +40,11 @@ class ClientFrameViewLinux : public FramelessView,
|
|||
gfx::Insets GetInputInsets() const;
|
||||
gfx::Rect GetWindowContentBounds() const;
|
||||
SkRRect GetRoundedWindowContentBounds() const;
|
||||
// Returns which edges of the frame are tiled.
|
||||
const ui::WindowTiledEdges& tiled_edges() const { return tiled_edges_; }
|
||||
void set_tiled_edges(ui::WindowTiledEdges tiled_edges) {
|
||||
tiled_edges_ = tiled_edges;
|
||||
}
|
||||
|
||||
protected:
|
||||
// ui::NativeThemeObserver:
|
||||
|
@ -137,6 +143,8 @@ class ClientFrameViewLinux : public FramelessView,
|
|||
window_button_order_observer_{this};
|
||||
|
||||
base::CallbackListSubscription paint_as_active_changed_subscription_;
|
||||
|
||||
ui::WindowTiledEdges tiled_edges_;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -190,8 +190,8 @@ v8::Local<v8::Value> Converter<blink::PermissionType>::ToV8(
|
|||
return StringToV8(isolate, "vr");
|
||||
case blink::PermissionType::WAKE_LOCK_SYSTEM:
|
||||
return StringToV8(isolate, "system-wake-lock");
|
||||
case blink::PermissionType::WINDOW_PLACEMENT:
|
||||
return StringToV8(isolate, "window-placement");
|
||||
case blink::PermissionType::WINDOW_MANAGEMENT:
|
||||
return StringToV8(isolate, "window-management");
|
||||
case blink::PermissionType::DISPLAY_CAPTURE:
|
||||
return StringToV8(isolate, "display-capture");
|
||||
case blink::PermissionType::NUM:
|
||||
|
|
39
shell/common/plugin_info.cc
Normal file
39
shell/common/plugin_info.cc
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) 2022 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/common/plugin_info.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/common/pdf_util.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "shell/common/electron_constants.h"
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
namespace electron {
|
||||
|
||||
void GetInternalPlugins(std::vector<content::WebPluginInfo>* plugins) {
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
// NB. in Chrome, this plugin isn't registered until the PDF extension is
|
||||
// loaded. However, in Electron, we load the PDF extension unconditionally
|
||||
// when it is enabled in the build, so we're OK to load the plugin eagerly
|
||||
// here.
|
||||
plugins->push_back(GetPDFPluginInfo());
|
||||
#endif
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
content::WebPluginInfo GetPDFPluginInfo() {
|
||||
content::WebPluginInfo info;
|
||||
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
|
||||
info.name = base::ASCIIToUTF16(kPDFExtensionPluginName);
|
||||
// This isn't a real file path; it's just used as a unique identifier.
|
||||
info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId);
|
||||
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
|
||||
info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format");
|
||||
return info;
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
} // namespace electron
|
23
shell/common/plugin_info.h
Normal file
23
shell/common/plugin_info.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright (c) 2022 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_COMMON_PLUGIN_INFO_H_
|
||||
#define ELECTRON_SHELL_COMMON_PLUGIN_INFO_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "content/public/common/content_plugin_info.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
void GetInternalPlugins(std::vector<content::WebPluginInfo>* plugins);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
content::WebPluginInfo GetPDFPluginInfo();
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_COMMON_PLUGIN_INFO_H_
|
|
@ -19,7 +19,11 @@
|
|||
namespace electron {
|
||||
|
||||
namespace {
|
||||
enum SerializationTag { kNativeImageTag = 'i', kVersionTag = 0xFF };
|
||||
enum SerializationTag {
|
||||
kNativeImageTag = 'i',
|
||||
kTrailerOffsetTag = 0xFE,
|
||||
kVersionTag = 0xFF
|
||||
};
|
||||
} // namespace
|
||||
|
||||
class V8Serializer : public v8::ValueSerializer::Delegate {
|
||||
|
@ -167,6 +171,23 @@ class V8Deserializer : public v8::ValueDeserializer::Delegate {
|
|||
return false;
|
||||
if (!deserializer_.ReadUint32(blink_version))
|
||||
return false;
|
||||
static constexpr uint32_t kMinWireFormatVersionWithTrailer = 21;
|
||||
if (*blink_version >= kMinWireFormatVersionWithTrailer) {
|
||||
// In these versions, we expect kTrailerOffsetTag (0xFE) followed by an
|
||||
// offset and size. See details in
|
||||
// third_party/blink/renderer/core/v8/serialization/serialization_tag.h.
|
||||
uint8_t trailer_offset_tag = 0;
|
||||
if (!ReadTag(&trailer_offset_tag) ||
|
||||
trailer_offset_tag != kTrailerOffsetTag)
|
||||
return false;
|
||||
const void* trailer_offset_and_size_bytes = nullptr;
|
||||
static constexpr size_t kTrailerOffsetDataSize =
|
||||
sizeof(uint64_t) + sizeof(uint32_t);
|
||||
if (!deserializer_.ReadRawBytes(kTrailerOffsetDataSize,
|
||||
&trailer_offset_and_size_bytes))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
#include "shell/common/plugin_info.h"
|
||||
#include "shell/renderer/pepper_helper.h"
|
||||
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||
|
||||
|
@ -420,19 +421,12 @@ bool RendererClientBase::IsPluginHandledExternally(
|
|||
->CreateFrameContainer(plugin_element, original_url, mime_type, info);
|
||||
}
|
||||
|
||||
// TODO(nornagon): this info should be shared with the data in
|
||||
// electron_content_client.cc / ComputeBuiltInPlugins.
|
||||
content::WebPluginInfo info;
|
||||
info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
|
||||
info.name = base::ASCIIToUTF16(kPDFExtensionPluginName);
|
||||
info.path = base::FilePath::FromUTF8Unsafe(extension_misc::kPdfExtensionId);
|
||||
info.background_color = content::WebPluginInfo::kDefaultBackgroundColor;
|
||||
info.mime_types.emplace_back(kPDFMimeType, "pdf", "Portable Document Format");
|
||||
return extensions::MimeHandlerViewContainerManager::Get(
|
||||
content::RenderFrame::FromWebFrame(
|
||||
plugin_element.GetDocument().GetFrame()),
|
||||
true /* create_if_does_not_exist */)
|
||||
->CreateFrameContainer(plugin_element, original_url, mime_type, info);
|
||||
->CreateFrameContainer(plugin_element, original_url, mime_type,
|
||||
GetPDFPluginInfo());
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue