electron/shell/common/application_info_mac.mm

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 строки
984 B
Plaintext
Исходник Постоянная ссылка Обычный вид История

2018-10-24 13:49:10 +03:00
// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "shell/common/application_info.h"
2018-10-24 13:49:10 +03:00
#include <string>
chore: bump chromium to 118.0.5975.0 (main) (#39531) * chore: bump chromium in DEPS to 118.0.5951.0 * chore: update printing.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4727894 No logic changes, but patch needed to be manually re-applied due to upstream code shear * chore: update port_autofill_colors_to_the_color_pipeline.patch No manual changes; patch applied with fuzz * chore: update patches * chore: bump chromium in DEPS to 118.0.5953.0 * chore: update patches * chore: bump chromium in DEPS to 118.0.5955.0 * chore: update patches * chore: bump chromium in DEPS to 118.0.5957.0 * chore: update patches * chore: include path of native_web_keyboard_event.h Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689 * chore: remove reference to eextensions/browser/notification-types.h Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4771627 * chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689 Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code? * chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4784198 * chore: add auto_pip_setting_helper.[cc,h] to chromium_src build Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4688277 Exiting upstream code used by chromium_src now depends on this new upstream class * chore: bump chromium in DEPS to 118.0.5959.0 * chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch manually adjust patch to minor upstream chagnes * chore: update patches * chore: bump chromium in DEPS to 118.0.5961.0 * chore: bump chromium in DEPS to 118.0.5963.0 * chore: update patches * 4780994: Rename various base files to "apple" since iOS uses them too https://chromium-review.googlesource.com/c/chromium/src/+/4780994 * Many files moved from `mac` -> `apple` This commit follows a handful of CLs that simply rename files/symbols to change `mac` to `apple` to signify their use across both macOS and iOS: - 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header - 4790744: Move foundation_util to base/apple, leave a forwarding header - 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header - 4787627: Move and rename macOS+iOS base/ files in PA to "apple" - 4780399: Move OSStatus logging to base/apple - 4787387: Remove forwarding headers - 4781113: Rename message_pump_mac to "apple" because iOS uses it too * fixup minor patch update error A function param got dropped from this patch somewhere earlier * chore: bump chromium in DEPS to 118.0.5965.2 * chore: update patches * 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base::apple:: https://chromium-review.googlesource.com/c/chromium/src/+/4799213 * Fix removed include to BrowserContext In crrev.com/c/4767962 an include to BrowserContext was removed, which was necessary for compilation. This broke only for us because "chrome/browser/profiles/profile.h" includes that class, but we remove all references to profiles. * chore: bump chromium in DEPS to 118.0.5967.0 * chore: update patches * chore: bump chromium in DEPS to 118.0.5969.0 * chore: update patches * chore: bump chromium in DEPS to 118.0.5971.0 * chore: bump chromium in DEPS to 118.0.5973.0 * chore: update patches * 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper https://chromium-review.googlesource.com/c/chromium/src/+/4772121 * 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate. https://chromium-review.googlesource.com/c/chromium/src/+/4811164 * 4809488: Remove duplicate dnd functionality between Web and Renderer prefs https://chromium-review.googlesource.com/c/chromium/src/+/4809488 Given that this is no longer an option of web preferences, we should consider deprecating this option and then removing it. * chore: bump chromium in DEPS to 118.0.5975.0 * chore: update patches * fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build * Reland "[windows] Remove RegKey::DeleteEmptyKey" Refs https://chromium-review.googlesource.com/c/chromium/src/+/4813255 * Ensure StrCat means StrCat Refs https://chromium-review.googlesource.com/c/chromium/src/+/1117180 * fixup! Remove RegKey::DeleteEmptyKey * Consistently reject large p and large q in DH Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226 --------- 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: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: deepak1556 <hop2deep@gmail.com>
2023-09-01 09:54:59 +03:00
#include "base/apple/foundation_util.h"
#include "base/strings/sys_string_conversions.h"
#include "shell/common/mac/main_application_bundle.h"
2018-10-24 13:49:10 +03:00
namespace electron {
namespace {
std::string ApplicationInfoDictionaryValue(NSString* key) {
2018-04-20 21:47:04 +03:00
return base::SysNSStringToUTF8(
[MainApplicationBundle().infoDictionary objectForKey:key]);
}
std::string ApplicationInfoDictionaryValue(CFStringRef key) {
chore: bump chromium to 117.0.5923.0 (main) (#39304) * chore: bump chromium in DEPS to 117.0.5921.0 * chore: update chromium patches * 4721409: Remove redundant ARC configuration in /components | https://chromium-review.googlesource.com/c/chromium/src/+/4721409 * 4643750: Add V8_LOW_PRIORITY_TQ for main thread | https://chromium-review.googlesource.com/c/chromium/src/+/4643750 * 4022621: Re-register status item when owner of status watcher is changed | https://chromium-review.googlesource.com/c/chromium/src/+/4022621 * chore: update V8/boringssl patches * fixup! 4643750: Add V8_LOW_PRIORITY_TQ for main thread | https://chromium-review.googlesource.com/c/chromium/src/+/4643750 * chore: bump chromium in DEPS to 117.0.5923.0 * build [debug]: remove assert 4722125: Update enterprise content analysis buildflags usage | https://chromium-review.googlesource.com/c/chromium/src/+/4722125 * chore: manually rollback to 117.0.5921.0 * build [arc]: ARC conversion in auto_updater * build [arc]: ARC conversion in browser/api * build [arc]: ARC conversion in notifications/mac * build [arc]: ARC conversion in in_app_purchase * build [arc]: ARC conversion in browser/ui * build [arc]: ARC conversion in ui/cocoa * build [arc]: ARC conversion in shell/common * build [arc]: ARC conversion in OSR * build [arc]: ARC conversion in login_helper * build [arc]: ARC conversion in app_mas * build [arc]: fix up ARC syntax (thanks @codebytere!) * 4726946: [Extensions] Work around dangling BrowserContext pointer. | https://chromium-review.googlesource.com/c/chromium/src/+/4726946 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
2023-08-04 11:47:29 +03:00
NSString* key_ns = const_cast<NSString*>((__bridge const NSString*)(key));
chore: bump chromium to 117.0.5884.1 (main) (#38969) * chore: bump chromium in DEPS to 117.0.5866.0 * chore: bump chromium in DEPS to 117.0.5868.0 * chore: update mas_no_private_api.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634925 Minor manual patch syncing due to upstream code shear * chore: update mas_disable_remote_layer.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4647191 Manually sync patch to minor upstream code shear * chore: update mas_disable_remote_accessibility.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4641746 No manual changes; patch applied with fuzz * chore: update mas_avoid_usage_of_private_macos_apis.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634925 Manually sync base/process/launch_mac.cc to minor upstream shear Manually sync base/mac/foundation_util.mm to upstream changes: _CFIsObjC use has been removed upstream, so we no longer need to remove it 🎉 * chore: update printing.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658496 Manually sync patch to minor upstream code shear * chore: update disable_color_correct_rendering.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4625254 Manually sync patch to minor upstream code shear * chore: update feat_expose_raw_response_headers_from_urlloader.patch Xref: services/network/public/cpp/resource_request.cc No manual changes; patch applied with fuzz * chore: update add_electron_deps_to_license_credits_file.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634961 No manual changes; patch applied with fuzz * chore: update build_only_use_the_mas_build_config_in_the_required_components.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4648411 No manual changes; patch applied with fuzz * chore: update patches * fixup! chore: update add_electron_deps_to_license_credits_file.patch chore: license files must be an array * chore: bump chromium in DEPS to 117.0.5870.0 * chore: update patches * chore: run ./script/gen-libc++-filenames.js * chore: update json_parse_errors_made_user-friendly.patch Xref: https://chromium-review.googlesource.com/c/v8/v8/+/4652014 v8 error message changed upstream; update Node test to match it * chore: bump chromium in DEPS to 117.0.5872.0 * chore: update patches * chore: explicitly cast x11::Window to unsigned int Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4661049 This is an `enum class Window : uint32_t` defined in ui/gfx/x/xproto.h. Previous versions of clang let this implicit cast happen, but it generates a warning in the new clang roll. * chore: remove unused #include Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4650453 header was removed upstream, so FTBFS unless removed here * chore: add include guard patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373 h/t @jkleinsc * chore: bump chromium in DEPS to 117.0.5874.0 * chore: update render_widget_host_view_mac.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4661244 Manually sync patch to minor upstream code * chore: update mas_disable_remote_accessibility.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4653209 Manually sync patch to upstream code shear * chore: update build_only_use_the_mas_build_config_in_the_required_components.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4653209 Manually sync patch to minor upstream code shear * chore: update GetInitiatorProcessId() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4641991 trivial upstream naming change: s/ProcessID/ProcessId/ * chore: sync to upstream SetInputRegion() changes Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4665245 Simple upstream chang: SetInputRegion() used to take a gfx::Rect* where `nullptr` meant "no opaque region". The function signature changed to absl::optional<gfx::Rect> w/the same meaning. * chore: sync to upstream SetOpaqueRegion() changes Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4656738 Simple upstream chang: SetOpaqueRegion() used to take a vector<Rect>* where `nullptr` meant "no opaque region". The function signature changed to absl::optional<std::vector<gfx::Rect>> w/the same meaning. * chore: update patches * chore: bump chromium in DEPS to 117.0.5876.0 * chore: update mas_disable_remote_accessibility.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658375 We no longer need to patch out a field that's now removed upstream. RenderWidgetHostNSViewBridgeOwner.remote_accessibility_element_ * chore: update feat_filter_out_non-shareable_windows_in_the_current_application_in.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658680 Manually sync patch to upstream code shear (ARC adoption). * chore: update patches * fix: -Werror,-Wshadow error in Node.js * chore: bump chromium in DEPS to 117.0.5878.0 * chore: bump chromium in DEPS to 117.0.5880.0 * chore: bump chromium in DEPS to 117.0.5880.4 * chore: update patches * 4658680: Convert /content/browser to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4658680 * 4669995: Remove CFToNSCast and NSToCFCast https://chromium-review.googlesource.com/c/chromium/src/+/4669995 * WIP: 4658680: Convert /content/browser to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4658680 * chore: update printing patch after rebase * chore: bump chromium in DEPS to 117.0.5882.0 * Revert "WIP: 4658680: Convert /content/browser to use ARC" This reverts commit c8559ea448ad93123865a6fa8af6fe2767e43396. * Revert "4669995: Remove CFToNSCast and NSToCFCast" This reverts commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e. * chore: bump chromium in DEPS to 117.0.5874.0 * 4661244: Convert /content/browser/renderer_host to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4661244 * 4653209: Convert /ui/views:views to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4653209 * chore: fixup mas_disable_remote_accessibility.patch * chore: fixup render_widget_host_view_mac.patch * chore: update to newer clang * chore: bump chromium in DEPS to 117.0.5884.1 (cherry picked from commit a3879acfde8f3d962d58d6ad0632164ccb88ee63) * 4669995: Remove CFToNSCast and NSToCFCast https://chromium-review.googlesource.com/c/chromium/src/+/4669995 (cherry picked from commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e) (cherry picked from commit b1224ab7e00aedbd0e5dc78ebb3c6162573b28c4) * 4658680: Convert /content/browser to use ARC https://chromium-review.googlesource.com/c/chromium/src/+/4658680 (cherry picked from commit 77039a323b9ebb3e8edb3a92a3b94a8d7d026a32) * Rename and cleanup ExtensionsBrowserClient functions | https://chromium-review.googlesource.com/c/chromium/src/+/4665670 (cherry picked from commit 677a2e646a8d82da60dc252b08b320c3ddff6be6) * chore: bump chromium in DEPS to 117.0.5886.0 * chore: update patches * Revert "chore: update patches" This reverts commit db9294f9446492d4a3d63f5f3ecc551aeeeb2e26. * Revert "chore: bump chromium in DEPS to 117.0.5886.0" This reverts commit a7de0276e6e0eeecfdbb17f9bbc27c01b4bbfc24. * build: use built toolchains instead of locally installed VSCode * fixup: build: use built toolchains instead of locally installed VSCode * chore: add missing mojo dep --------- 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: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2023-07-16 17:14:43 +03:00
return ApplicationInfoDictionaryValue(key_ns);
}
} // namespace
std::string GetApplicationName() {
return ApplicationInfoDictionaryValue(kCFBundleNameKey);
}
std::string GetApplicationVersion() {
return ApplicationInfoDictionaryValue(@"CFBundleShortVersionString");
}
2018-10-24 13:49:10 +03:00
} // namespace electron