2017-01-27 01:14:56 +01:00
|
|
|
// Copyright 2017 The Chromium Embedded Framework Authors. Portions copyright
|
|
|
|
// 2011 The Chromium Authors. All rights reserved. Use of this source code is
|
|
|
|
// governed by a BSD-style license that can be found in the LICENSE file.
|
2015-03-25 22:22:47 +01:00
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_COMMON_UTIL_MAC_H_
|
|
|
|
#define CEF_LIBCEF_COMMON_UTIL_MAC_H_
|
|
|
|
#pragma once
|
|
|
|
|
2018-07-27 23:28:12 +02:00
|
|
|
#include <string>
|
|
|
|
|
2022-10-04 21:54:13 +02:00
|
|
|
#include "base/files/file_path.h"
|
2015-03-25 22:22:47 +01:00
|
|
|
|
|
|
|
namespace util_mac {
|
|
|
|
|
2017-01-27 01:14:56 +01:00
|
|
|
// Returns the path to the NSLibraryDirectory (e.g. "~/Library").
|
2015-03-25 22:22:47 +01:00
|
|
|
bool GetLocalLibraryDirectory(base::FilePath* result);
|
|
|
|
|
2022-10-04 21:54:13 +02:00
|
|
|
// Returns the framework name (e.g. "Chromium Embedded Framework").
|
|
|
|
base::FilePath::StringType GetFrameworkName();
|
|
|
|
|
2017-01-27 01:14:56 +01:00
|
|
|
// Returns the path to the CEF framework directory inside the top-level app
|
|
|
|
// bundle (e.g. "myapp.app/Contents/Frameworks/Chromium Embedded
|
|
|
|
// Framework.framework"). May return an empty value if not running in an app
|
|
|
|
// bundle.
|
|
|
|
base::FilePath GetFrameworkDirectory();
|
|
|
|
|
|
|
|
// Returns the path to the Resources directory inside the CEF framework
|
|
|
|
// directory (e.g. "myapp.app/Contents/Frameworks/Chromium Embedded
|
|
|
|
// Framework.framework/Resources"). May return an empty value if not running in
|
|
|
|
// an app bundle.
|
|
|
|
base::FilePath GetFrameworkResourcesDirectory();
|
|
|
|
|
|
|
|
// Returns the path to the main (running) process executable (e.g.
|
|
|
|
// "myapp.app/Contents/MacOS/myapp").
|
|
|
|
base::FilePath GetMainProcessPath();
|
|
|
|
|
2018-07-27 23:28:12 +02:00
|
|
|
// Returns the path to the top-level app bundle that contains the main process
|
|
|
|
// executable (e.g. "myapp.app").
|
|
|
|
base::FilePath GetMainBundlePath();
|
|
|
|
|
|
|
|
// Returns the identifier for the top-level app bundle.
|
|
|
|
std::string GetMainBundleID();
|
|
|
|
|
2017-01-27 01:14:56 +01:00
|
|
|
// Returns the path to the Resources directory inside the top-level app bundle
|
|
|
|
// (e.g. "myapp.app/Contents/Resources"). May return an empty value if not
|
|
|
|
// running in an app bundle.
|
|
|
|
base::FilePath GetMainResourcesDirectory();
|
|
|
|
|
2020-07-06 20:14:57 +02:00
|
|
|
// Called from MainDelegate::PreSandboxStartup for the main process.
|
|
|
|
void PreSandboxStartup();
|
|
|
|
|
|
|
|
// Called from MainDelegate::BasicStartupComplete for all processes.
|
|
|
|
void BasicStartupComplete();
|
|
|
|
|
2015-03-25 22:22:47 +01:00
|
|
|
} // namespace util_mac
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COMMON_UTIL_MAC_H_
|