/src/Library/shared/NetDimension.NanUI.SharedProject/thrid_party_libs/ChromiumFX/Generated/Remote/CfrBrowser.cs

https://github.com/NetDimension/NanUI · C# · 352 lines · 173 code · 28 blank · 151 comment · 4 complexity · fe9062cd47ebb572f8cb3af3572293d6 MD5 · raw file

  1. // Copyright (c) 2014-2017 Wolfgang Borgsmüller
  2. // All rights reserved.
  3. //
  4. // This software may be modified and distributed under the terms
  5. // of the BSD license. See the License.txt file for details.
  6. // Generated file. Do not edit.
  7. using System;
  8. namespace Chromium.Remote {
  9. /// <summary>
  10. /// Structure used to represent a browser window. When used in the browser
  11. /// process the functions of this structure may be called on any thread unless
  12. /// otherwise indicated in the comments. When used in the render process the
  13. /// functions of this structure may only be called on the main thread.
  14. /// </summary>
  15. /// <remarks>
  16. /// See also the original CEF documentation in
  17. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  18. /// </remarks>
  19. public class CfrBrowser : CfrBaseLibrary {
  20. internal static CfrBrowser Wrap(RemotePtr remotePtr) {
  21. if(remotePtr == RemotePtr.Zero) return null;
  22. var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;
  23. bool isNew = false;
  24. var wrapper = (CfrBrowser)weakCache.GetOrAdd(remotePtr.ptr, () => {
  25. isNew = true;
  26. return new CfrBrowser(remotePtr);
  27. });
  28. if(!isNew) {
  29. var call = new CfxApiReleaseRemoteCall();
  30. call.nativePtr = remotePtr.ptr;
  31. call.RequestExecution(remotePtr.connection);
  32. }
  33. return wrapper;
  34. }
  35. private CfrBrowser(RemotePtr remotePtr) : base(remotePtr) {}
  36. /// <summary>
  37. /// Returns true (1) if the browser can navigate backwards.
  38. /// </summary>
  39. /// <remarks>
  40. /// See also the original CEF documentation in
  41. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  42. /// </remarks>
  43. public bool CanGoBack {
  44. get {
  45. var connection = RemotePtr.connection;
  46. var call = new CfxBrowserCanGoBackRemoteCall();
  47. call.@this = RemotePtr.ptr;
  48. call.RequestExecution(connection);
  49. return call.__retval;
  50. }
  51. }
  52. /// <summary>
  53. /// Returns true (1) if the browser can navigate forwards.
  54. /// </summary>
  55. /// <remarks>
  56. /// See also the original CEF documentation in
  57. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  58. /// </remarks>
  59. public bool CanGoForward {
  60. get {
  61. var connection = RemotePtr.connection;
  62. var call = new CfxBrowserCanGoForwardRemoteCall();
  63. call.@this = RemotePtr.ptr;
  64. call.RequestExecution(connection);
  65. return call.__retval;
  66. }
  67. }
  68. /// <summary>
  69. /// Returns true (1) if the browser is currently loading.
  70. /// </summary>
  71. /// <remarks>
  72. /// See also the original CEF documentation in
  73. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  74. /// </remarks>
  75. public bool IsLoading {
  76. get {
  77. var connection = RemotePtr.connection;
  78. var call = new CfxBrowserIsLoadingRemoteCall();
  79. call.@this = RemotePtr.ptr;
  80. call.RequestExecution(connection);
  81. return call.__retval;
  82. }
  83. }
  84. /// <summary>
  85. /// Returns the globally unique identifier for this browser. This value is also
  86. /// used as the tabId for extension APIs.
  87. /// </summary>
  88. /// <remarks>
  89. /// See also the original CEF documentation in
  90. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  91. /// </remarks>
  92. public int Identifier {
  93. get {
  94. var connection = RemotePtr.connection;
  95. var call = new CfxBrowserGetIdentifierRemoteCall();
  96. call.@this = RemotePtr.ptr;
  97. call.RequestExecution(connection);
  98. return call.__retval;
  99. }
  100. }
  101. /// <summary>
  102. /// Returns true (1) if the window is a popup window.
  103. /// </summary>
  104. /// <remarks>
  105. /// See also the original CEF documentation in
  106. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  107. /// </remarks>
  108. public bool IsPopup {
  109. get {
  110. var connection = RemotePtr.connection;
  111. var call = new CfxBrowserIsPopupRemoteCall();
  112. call.@this = RemotePtr.ptr;
  113. call.RequestExecution(connection);
  114. return call.__retval;
  115. }
  116. }
  117. /// <summary>
  118. /// Returns true (1) if a document has been loaded in the browser.
  119. /// </summary>
  120. /// <remarks>
  121. /// See also the original CEF documentation in
  122. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  123. /// </remarks>
  124. public bool HasDocument {
  125. get {
  126. var connection = RemotePtr.connection;
  127. var call = new CfxBrowserHasDocumentRemoteCall();
  128. call.@this = RemotePtr.ptr;
  129. call.RequestExecution(connection);
  130. return call.__retval;
  131. }
  132. }
  133. /// <summary>
  134. /// Returns the main (top-level) frame for the browser window.
  135. /// </summary>
  136. /// <remarks>
  137. /// See also the original CEF documentation in
  138. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  139. /// </remarks>
  140. public CfrFrame MainFrame {
  141. get {
  142. var connection = RemotePtr.connection;
  143. var call = new CfxBrowserGetMainFrameRemoteCall();
  144. call.@this = RemotePtr.ptr;
  145. call.RequestExecution(connection);
  146. return CfrFrame.Wrap(new RemotePtr(connection, call.__retval));
  147. }
  148. }
  149. /// <summary>
  150. /// Returns the focused frame for the browser window.
  151. /// </summary>
  152. /// <remarks>
  153. /// See also the original CEF documentation in
  154. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  155. /// </remarks>
  156. public CfrFrame FocusedFrame {
  157. get {
  158. var connection = RemotePtr.connection;
  159. var call = new CfxBrowserGetFocusedFrameRemoteCall();
  160. call.@this = RemotePtr.ptr;
  161. call.RequestExecution(connection);
  162. return CfrFrame.Wrap(new RemotePtr(connection, call.__retval));
  163. }
  164. }
  165. /// <summary>
  166. /// Returns the number of frames that currently exist.
  167. /// </summary>
  168. /// <remarks>
  169. /// See also the original CEF documentation in
  170. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  171. /// </remarks>
  172. public ulong FrameCount {
  173. get {
  174. var connection = RemotePtr.connection;
  175. var call = new CfxBrowserGetFrameCountRemoteCall();
  176. call.@this = RemotePtr.ptr;
  177. call.RequestExecution(connection);
  178. return call.__retval;
  179. }
  180. }
  181. /// <summary>
  182. /// Returns the identifiers of all existing frames.
  183. /// </summary>
  184. /// <remarks>
  185. /// See also the original CEF documentation in
  186. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  187. /// </remarks>
  188. public long[] FrameIdentifiers {
  189. get {
  190. var connection = RemotePtr.connection;
  191. var call = new CfxBrowserGetFrameIdentifiersRemoteCall();
  192. call.@this = RemotePtr.ptr;
  193. call.RequestExecution(connection);
  194. return call.__retval;
  195. }
  196. }
  197. /// <summary>
  198. /// Navigate backwards.
  199. /// </summary>
  200. /// <remarks>
  201. /// See also the original CEF documentation in
  202. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  203. /// </remarks>
  204. public void GoBack() {
  205. var connection = RemotePtr.connection;
  206. var call = new CfxBrowserGoBackRemoteCall();
  207. call.@this = RemotePtr.ptr;
  208. call.RequestExecution(connection);
  209. }
  210. /// <summary>
  211. /// Navigate forwards.
  212. /// </summary>
  213. /// <remarks>
  214. /// See also the original CEF documentation in
  215. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  216. /// </remarks>
  217. public void GoForward() {
  218. var connection = RemotePtr.connection;
  219. var call = new CfxBrowserGoForwardRemoteCall();
  220. call.@this = RemotePtr.ptr;
  221. call.RequestExecution(connection);
  222. }
  223. /// <summary>
  224. /// Reload the current page.
  225. /// </summary>
  226. /// <remarks>
  227. /// See also the original CEF documentation in
  228. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  229. /// </remarks>
  230. public void Reload() {
  231. var connection = RemotePtr.connection;
  232. var call = new CfxBrowserReloadRemoteCall();
  233. call.@this = RemotePtr.ptr;
  234. call.RequestExecution(connection);
  235. }
  236. /// <summary>
  237. /// Reload the current page ignoring any cached data.
  238. /// </summary>
  239. /// <remarks>
  240. /// See also the original CEF documentation in
  241. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  242. /// </remarks>
  243. public void ReloadIgnoreCache() {
  244. var connection = RemotePtr.connection;
  245. var call = new CfxBrowserReloadIgnoreCacheRemoteCall();
  246. call.@this = RemotePtr.ptr;
  247. call.RequestExecution(connection);
  248. }
  249. /// <summary>
  250. /// Stop loading the page.
  251. /// </summary>
  252. /// <remarks>
  253. /// See also the original CEF documentation in
  254. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  255. /// </remarks>
  256. public void StopLoad() {
  257. var connection = RemotePtr.connection;
  258. var call = new CfxBrowserStopLoadRemoteCall();
  259. call.@this = RemotePtr.ptr;
  260. call.RequestExecution(connection);
  261. }
  262. /// <summary>
  263. /// Returns true (1) if this object is pointing to the same handle as |that|
  264. /// object.
  265. /// </summary>
  266. /// <remarks>
  267. /// See also the original CEF documentation in
  268. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  269. /// </remarks>
  270. public bool IsSame(CfrBrowser that) {
  271. var connection = RemotePtr.connection;
  272. var call = new CfxBrowserIsSameRemoteCall();
  273. call.@this = RemotePtr.ptr;
  274. if(!CfrObject.CheckConnection(that, connection)) throw new ArgumentException("Render process connection mismatch.", "that");
  275. call.that = CfrObject.Unwrap(that).ptr;
  276. call.RequestExecution(connection);
  277. return call.__retval;
  278. }
  279. /// <summary>
  280. /// Returns the frame with the specified identifier, or NULL if not found.
  281. /// </summary>
  282. /// <remarks>
  283. /// See also the original CEF documentation in
  284. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  285. /// </remarks>
  286. public CfrFrame GetFrame(long identifier) {
  287. var connection = RemotePtr.connection;
  288. var call = new CfxBrowserGetFrameByIdentifierRemoteCall();
  289. call.@this = RemotePtr.ptr;
  290. call.identifier = identifier;
  291. call.RequestExecution(connection);
  292. return CfrFrame.Wrap(new RemotePtr(connection, call.__retval));
  293. }
  294. /// <summary>
  295. /// Returns the frame with the specified name, or NULL if not found.
  296. /// </summary>
  297. /// <remarks>
  298. /// See also the original CEF documentation in
  299. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  300. /// </remarks>
  301. public CfrFrame GetFrame(string name) {
  302. var connection = RemotePtr.connection;
  303. var call = new CfxBrowserGetFrameRemoteCall();
  304. call.@this = RemotePtr.ptr;
  305. call.name = name;
  306. call.RequestExecution(connection);
  307. return CfrFrame.Wrap(new RemotePtr(connection, call.__retval));
  308. }
  309. /// <summary>
  310. /// Returns the names of all existing frames.
  311. /// </summary>
  312. /// <remarks>
  313. /// See also the original CEF documentation in
  314. /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
  315. /// </remarks>
  316. public System.Collections.Generic.List<string> GetFrameNames() {
  317. var connection = RemotePtr.connection;
  318. var call = new CfxBrowserGetFrameNamesRemoteCall();
  319. call.@this = RemotePtr.ptr;
  320. call.RequestExecution(connection);
  321. return call.__retval;
  322. }
  323. }
  324. }