#region 程序集 FBroSharpInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// T:\Csharp\莫生\莫生\packages\FBroSharp.Common.4.20.38\FBroSharp\x64\FBroSharpInterface.dll
// Decompiled with ICSharpCode.Decompiler 8.1.1.7464
#endregion
using System;
using System.Collections.Generic;
using FBroSharp.Event;
using FBroSharp.Value;
namespace FBroSharp.Lib;
public interface IFBroSharpRequestContext : IFBroSharpBase, IDisposable
{
//
// 摘要:
// 是否有效
bool IsValid { get; }
//
// 摘要:
// 是否为全局
//
// Returns true if this object is the global context. The global context is used
// by default when creating a browser or URL request with a NULL context argument.
bool IsGlobal();
//
// 摘要:
// 是否相同
//
// Returns true if this object is pointing to the same context as |that| object.
bool IsSame(IFBroSharpRequestContext that);
//
// 摘要:
// 取缓存路径
//
// Returns the cache path for this object. If empty an "incognito mode" in-memory
// cache is being used.
string GetCachePath();
//
// 摘要:
// 取Cookie管理器
//
// Returns the cookie manager for this object. If |callback| is non-NULL it will
// be executed asnychronously on the UI thread after the manager's storage has been
// initialized.
IFBroSharpCookieManager GetCookieManager();
//
// 摘要:
// 是否存在首选项
//
// Returns true if a preference with the specified |name| exists. This method must
// be called on the browser process UI thread.
bool HasPreference(string name);
//
// 摘要:
// 通过name获取首选项
//
// Returns the value for the preference with the specified |name|. Returns NULL
// if the preference does not exist. The returned object contains a copy of the
// underlying preference value and modifications to the returned object will not
// modify the underlying preference value. This method must be called on the browser
// process UI thread.
IFBroSharpValue GetPreference(string name);
//
// 摘要:
// 获取首选项
//
// Returns all preferences as a dictionary. If |include_defaults| is true then preferences
// currently at their default value will be included. The returned object contains
// a copy of the underlying preference values and modifications to the returned
// object will not modify the underlying preference values. This method must be
// called on the browser process UI thread.
IFBroSharpDictionaryValue GetAllPreferences(bool include_defaults);
//
// 摘要:
// 是否能置首选项
//
// Returns true if the preference with the specified |name| can be modified using
// SetPreference. As one example preferences set via the command-line usually cannot
// be modified. This method must be called on the browser process UI thread.
bool CanSetPreference(string name);
//
// 摘要:
// 置首选项
//
// Set the |value| associated with preference |name|. Returns true if the value
// is set successfully and false otherwise. If |value| is NULL the preference will
// be restored to its default value. If setting the preference fails then |error|
// will be populated with a detailed description of the problem. This method must
// be called on the browser process UI thread.
string SetPreference(string name, IFBroSharpValue value);
//
// 摘要:
// 加载扩展插件
//
// If extension resources will be read from disk using the default load implementation
// then |root_directory| should be the absolute path to the extension resources
// directory and |manifest| should be NULL. If extension resources will be provided
// by the client (e.g. via CefRequestHandler and/or CefExtensionHandler) then |root_directory|
// should be a path component unique to the extension (if not absolute this will
// be internally prefixed with the PK_DIR_RESOURCES path) and |manifest| should
// contain the contents that would otherwise be read from the "manifest.json" file
// on disk.
//
// The loaded extension will be accessible in all contexts sharing the same storage
// (HasExtension returns true). However, only the context on which this method was
// called is considered the loader (DidLoadExtension returns true) and only the
// loader will receive CefRequestContextHandler callbacks for the extension.
//
// CefExtensionHandler::OnExtensionLoaded will be called on load success or CefExtensionHandler::OnExtensionLoadFailed
// will be called on load failure.
//
// If the extension specifies a background script via the "background" manifest
// key then CefExtensionHandler::OnBeforeBackgroundBrowser will be called to create
// the background browser. See that method for additional information about background
// scripts.
//
// For visible extension views the client application should evaluate the manifest
// to determine the correct extension URL to load and then pass that URL to the
// CefBrowserHost::CreateBrowser* function after the extension has loaded. For example,
// the client can look for the "browser_action" manifest key as documented at https://developer.chrome.com/extensions/browserAction.
// Extension URLs take the form "chrome-extension://<extension_id>/<path>".
//
// Browsers that host extensions differ from normal browsers as follows:
//
// - Can access chrome.* JavaScript APIs if allowed by the manifest. Visit chrome://extensions-support
// for the list of extension APIs currently supported by CEF.
//
// - Main frame navigation to non-extension content is blocked.
//
// - Pinch-zooming is disabled.
//
// - CefBrowserHost::GetExtension returns the hosted extension.
//
// - CefBrowserHost::IsBackgroundHost returns true for background hosts.
//
// See https://developer.chrome.com/extensions for extension implementation and
// usage documentation.
void LoadExtension(string inrootdirectory, IFBroSharpDictionaryValue inmanifest, FBroSharpExtensionHandler callback);
//
// 摘要:
// VIP_安装扩展插件
//
// VIP功能需赞助后才能使用。赞助说明链接:https://www.showdoc.com.cn/FBrowserCEF3Lib/8548994810810201
void VIP_InstallCrx(string path, FBroSharpExtensionHandler callback);
//
// 摘要:
// 已加载扩展插件
//
// Returns true if this context was used to load the extension identified by |extension_id|.
// Other contexts sharing the same storage will also have access to the extension
// (see HasExtension). This method must be called on the browser process UI thread.
bool DidLoadExtension(string extension_id);
//
// 摘要:
// 已访问扩展插件
//
// Returns true if this context has access to the extension identified by |extension_id|.
// This may not be the context that was used to load the extension (see DidLoadExtension).
// This method must be called on the browser process UI thread.
bool HasExtension(string extension_id);
//
// 摘要:
// 取插件清单
//
// Retrieve the list of all extensions that this context has access to (see HasExtension).
// |extension_ids| will be populated with the list of extension ID values. Returns
// true on success. This method must be called on the browser process UI thread.
List<string> GetExtensionsList();
//
// 摘要:
// 取插件
//
// Returns the extension matching |extension_id| or NULL if no matching extension
// is accessible in this context (see HasExtension). This method must be called
// on the browser process UI thread.
IFBroSharpExtension GetExtension(string extension_id);
}
#if false // 反编译日志
缓存中的 14 项
------------------
解析: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll"
------------------
解析: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll"
#endif