* chore: bump chromium in DEPS to 123.0.6300.2 * chore: bump chromium in DEPS to 123.0.6301.2 * chore: update patches * chore: bump chromium in DEPS to 123.0.6302.0 * chore: bump chromium in DEPS to 123.0.6304.0 * chore: update patches * chore: bump chromium in DEPS to 123.0.6306.2 * chore: update patches * chore: bump chromium in DEPS to 123.0.6308.0 * chore: update patches * Refactor //components/pdf/common constants https://chromium-review.googlesource.com/c/chromium/src/+/5292816 * Rename URLLoaderFactoryParams::is_corb_enabled to is_orb_enabled. Refs https://chromium-review.googlesource.com/c/chromium/src/+/5277040 * Add placeholder of speaker-selection permission. Refs https://chromium-review.googlesource.com/c/chromium/src/+/5278243 * Move kPdfMimeType to //components/pdf/common/constants.h Refs https://chromium-review.googlesource.com/c/chromium/src/+/5293155 * chore: gen-libc++-filenames.js * Make GetClassName non virtual Refs https://chromium-review.googlesource.com/c/chromium/src/+/5293075 Refs https://issues.chromium.org/issues/324596267 * chore: bump chromium in DEPS to 123.0.6310.0 * chore: update filenames.libcxx.gni * 5282732: Compute input region using correct pixel size. https://chromium-review.googlesource.com/c/chromium/src/+/5282732 * fixup: Make GetClassName non virtual * chore: bump chromium in DEPS to 123.0.6312.0 * chore: update patches * chore: bump chromium in DEPS to 123.0.6312.5 * fixup: Make GetClassName non virtual * docs: document speaker-selection https://chromium-review.googlesource.com/c/chromium/src/+/5278243 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
		
			
				
	
	
		
			40 lines
		
	
	
	
		
			1.5 KiB
			
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
	
		
			1.5 KiB
			
		
	
	
	
		
			C++
		
	
	
	
	
	
// 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 "components/pdf/common/constants.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(pdf::kPDFMimeType, "pdf",
 | 
						|
                               "Portable Document Format");
 | 
						|
  return info;
 | 
						|
}
 | 
						|
#endif  // BUILDFLAG(ENABLE_PDF_VIEWER)
 | 
						|
 | 
						|
}  // namespace electron
 |