diff --git a/CefSharp/Cef.h b/CefSharp/Cef.h index 44734d974..411fbfc8a 100644 --- a/CefSharp/Cef.h +++ b/CefSharp/Cef.h @@ -1,4 +1,4 @@ -// Copyright © 2010-2013 The CefSharp Project. All rights reserved. +// Copyright � 2010-2013 The CefSharp Project. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. @@ -67,8 +67,8 @@ namespace CefSharp public: - /// Gets whether CefSharp is initialized. - /// True if CefSharp is initalized, false otherwise + /// Gets a value that indicates whether CefSharp is initialized. + /// true if CefSharp is initalized; otherwise, false. static property bool IsInitialized { bool get() @@ -83,8 +83,8 @@ namespace CefSharp } } - /// Returns CefSharp Version - /// CefSharp Version as a String + /// Gets a value that indicates the version of CefSharp currently being used. + /// The CefSharp version. static property String^ CefSharpVersion { String^ get() @@ -94,8 +94,8 @@ namespace CefSharp } } - /// Returns CEF Version - /// CEF Version as a String + /// Gets a value that indicates the CEF version currently being used. + /// The CEF Version static property String^ CefVersion { String^ get() @@ -104,8 +104,8 @@ namespace CefSharp } } - /// Returns Chromium Version - /// Chromium Version as a String + /// Gets a value that indicates the Chromium version currently being used. + /// The Chromium version. static property String^ ChromiumVersion { String^ get() @@ -117,17 +117,17 @@ namespace CefSharp } } - /// Initialize CefSharp with default settings. - /// True if successful and false otherwise. + /// Initializes CefSharp with the default settings. + /// true if successful; otherwise, false. static bool Initialize() { auto cefSettings = gcnew CefSettings(); return Initialize(cefSettings); } - /// Initialize CefSharp settings. + /// Initializes CefSharp with user-provided settings. ///CefSharp configuration settings. - /// True if successful and false otherwise. + /// true if successful; otherwise, false. static bool Initialize(CefSettings^ cefSettings) { bool success = false; @@ -161,19 +161,19 @@ namespace CefSharp return success; } - /// Bind a C# class to a javascript object. - ///Name of javascript object. - ///C# object to bind. - /// Returns True + /// Binds a C# class to a JavaScript object. + /// The name for the new object in the JavaScript engine (e.g. 'foo' for an object accessible as 'foo' or 'window.foo'). + /// The .NET object to bind. + /// Always returns true. static bool RegisterJsObject(String^ name, Object^ objectToBind) { _boundObjects[name] = objectToBind; return true; } - /// Vist all cookies. The returned cookies are ordered by longest path, then by earliest creation date. - ///CefSharp Cookie Visitor - /// Returns false if cookies cannot be accessed, otherwise true. + /// Visits all cookies using the provided Cookie Visitor. The returned cookies are sorted by longest path, then by earliest creation date. + /// A user-provided Cookie Visitor implementation. + /// Returns false if the CookieManager is not available; otherwise, true. static bool VisitAllCookies(ICookieVisitor^ visitor) { CefRefPtr cookieVisitor = new CookieVisitor(visitor); @@ -189,13 +189,13 @@ namespace CefSharp } } - /// Vist a subset of cookies. The results are filtered by the given url scheme, host, domain and path. - /// If |includeHttpOnly| is true HTTP-only cookies will also be included in the results. The returned cookies - /// are ordered by longest path, then by earliest creation date. - ///Cookie Url - ///Allow HTTP-only cookies to be shown in results - ///CefSharp Cookie Visitor - /// Returns false if cookies cannot be accessed, otherwise true. + /// Visits a subset of the cookies. The results are filtered by the given url scheme, host, domain and path. + /// If is true, HTTP-only cookies will also be included in the results. The returned cookies + /// are sorted by longest path, then by earliest creation date. + /// The URL to use for filtering a subset of the cookies available. + /// A flag that determines whether HTTP-only cookies will be shown in results. + /// A user-provided Cookie Visitor implementation. + /// Returns false if the CookieManager is not available; otherwise, true. static bool VisitUrlCookies(String^ url, bool includeHttpOnly, ICookieVisitor^ visitor) { CefRefPtr cookieVisitor = new CookieVisitor(visitor); @@ -212,19 +212,19 @@ namespace CefSharp } } - /// Set a CefSharp Cookie. This function expects each attribute to be well-formed. It will check for disallowed + /// Sets a CefSharp Cookie. This function expects each attribute to be well-formed. It will check for disallowed /// characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting /// the cookie if such characters are found. - ///Cookie Url - ///Cookie Name - ///Cookie Value - ///Cookie Domain - ///Cookie Path - ///Marks cookie as secure (i.e. its scope is limited to secure channels, typically HTTPS). - ///Marks the cookiet as HTTP Only(i.e. the cookie is inaccessible to client-side scripts). - ///The cookie expiration date is only used if this is true. - ///Date of cookie expiration. Only used if has_expires is true. - /// Returns false if cookie cannot be set (Like if illegal charecters such as ';' are used), otherwise true. + /// The cookie URL + /// The cookie name + /// The cookie value + /// The cookie domain + /// The cookie path + /// A flag that determines whether the cookie will be marked as "secure" (i.e. its scope is limited to secure channels, typically HTTPS). + /// A flag that determines whether the cookie will be marked as HTTP Only (i.e. the cookie is inaccessible to client-side scripts). + /// A flag that determines whether the cookie has an expiration date. Must be set to true when the "expires" parameter is provided. + /// The DateTime when the cookie will be treated as expired. Will only be taken into account if the "has_expires" is set to true. + /// false if the cookie cannot be set (e.g. if illegal charecters such as ';' are used); otherwise true. static bool SetCookie(String^ url, String^ name, String^ value, String^ domain, String^ path, bool secure, bool httponly, bool has_expires, DateTime expires) { msclr::lock l(_sync); @@ -256,24 +256,24 @@ namespace CefSharp return _result; } - /// Set a CefSharp Cookie using mostly default parameters. This function expects each attribute to be well-formed. It will check for disallowed + /// Sets a cookie using mostly default parameters. This function expects each attribute to be well-formed. It will check for disallowed /// characters (e.g. the ';' character is disallowed within the cookie value attribute) and will return false without setting /// the cookie if such characters are found. - ///Cookie Url - ///Cookie Name - ///Cookie Value - ///Cookie Domain - ///Date of cookie expiration. Only used if has_expires is true. - /// Returns false if cookie cannot be set (Like if illegal charecters such as ';' are used), otherwise true. + /// The cookie URL + /// The cookie name. + /// The cookie value. + /// The cookie domain. + /// The DateTime when the cookie will be treated as expired. + /// false if the cookie cannot be set (e.g. if illegal charecters such as ';' are used); otherwise true. static bool SetCookie(String^ url, String^ domain, String^ name, String^ value, DateTime expires) { return SetCookie(url, name, value, domain, "/", false, false, true, expires); } - /// Delete all cookies that match the both following parameters. If both |url| and |name| are empty all cookies will be deleted. - ///(Optional) Cookie Url - ///(Optional) Name of Cookie/param> - /// Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed, otherwise true. + /// Deletes all cookies that matches all the provided parameters. If both and are empty, all cookies will be deleted. + /// The cookie URL. If an empty string is provided, any URL will be matched. + /// The name of the cookie. If an empty string is provided, any URL will be matched. + /// false if a non-empty invalid URL is specified, or if cookies cannot be accessed; otherwise, true. static bool DeleteCookies(String^ url, String^ name) { msclr::lock l(_sync); @@ -293,13 +293,13 @@ namespace CefSharp return _result; } - /// Sets the directory path that will be used for storing cookie data. If |path| is empty data will be stored in - /// memory only. Otherwise, data will be stored at the specified |path|. To persist session cookies (cookies without an expiry - /// date or validity interval) set |persist_session_cookies| to true. Session cookies are generally intended to be transient and - /// most Web browsers do not persist them. Returns false if cookies cannot be accessed. - /// (Optional) File path to write cookies to. - ///(Optional) Persist Session Cookies. - /// Returns false if a non-empty invalid URL is specified or if cookies cannot be accessed, otherwise true. + /// Sets the directory path that will be used for storing cookie data. If is empty data will be stored in + /// memory only. Otherwise, data will be stored at the specified path. To persist session cookies (cookies without an expiry + /// date or validity interval) set to true. Session cookies are generally intended to be transient and + /// most Web browsers do not persist them. + /// The file path to write cookies to. + /// A flag that determines whether session cookies will be persisted or not. + /// false if a non-empty invalid URL is specified, or if the CookieManager is not available; otherwise, true. static bool SetCookiePath(String^ path, bool persistSessionCookies) { CefRefPtr manager = CefCookieManager::GetGlobalManager(); @@ -314,9 +314,8 @@ namespace CefSharp } } - /// Shuts down CefSharp and the underlying CEF infrastructure. - /// This method is safe to call multiple times; it will only - /// shut down CEF on the first calls (all following calls will be ignored). + /// Shuts down CefSharp and the underlying CEF infrastructure. This method is safe to call multiple times; it will only + /// shut down CEF on the first call (all subsequent calls will be ignored). /// static void Shutdown() { @@ -327,4 +326,4 @@ namespace CefSharp } } }; -} \ No newline at end of file +}