Commit Graph

109 Commits

Author SHA1 Message Date
amaitland 4ffaeb8cab IMPLEMENT_REFCOUNTING template changed - Add missing semi colon
Follow up to https://github.com/cefsharp/CefSharp/commit/8d70f836860d3d1bf1593afbae66bb60cfa737c7
(Seems I missed a few cases)

https://github.com/chromiumembedded/cef/commit/725ed88529d7542e64b9735cf0da137d8a80a8b9#diff-221201fe823e7238023e4e7f7083e26fL142
2019-04-26 07:32:01 +10:00
amaitland 45a79dc520 WPF/OffScreen - Add OnVirtualKeyboardRequested method
- Added to IRenderHandler in OffScreen
- Added to ChromiumWebBrowser in WPF (protected virtual, so inherit and override to implement)

Resolves #2689
2019-03-27 20:29:27 +10:00
amaitland c02591116c RenderClientAdapter - Update GetViewRect to default to using width/height as 1 instead of 0 as CEF doesn't like 0
cefclient performs the same checks
2019-01-14 14:38:38 +10:00
amaitland bbf7795d80 WPF/OffScreen - Add OnAcceleratedPaint
Exposes the CEF API for Shared D3D11 Texture support. This should be considered experimental as there are quite a few known bugs in the CEF implementation
(PDF Viewer not working correctly)

OffScreen.ChromiumWebBrowser.CreateBrowser API changed (breaking change) now pass in `WindowInfo` to customise settings
Refactor CreateBrowser to support windowed and OSR rendering (now accepts IWindowInfo)

Resolves #2527
2018-12-16 19:37:12 +10:00
amaitland c618dc155b RenderClientAdapter.h - GetViewRect must return a CefRect
CEF API Change see https://bitbucket.org/chromiumembedded/cef/commits/09afa3a843531a1768896bed3f64fb49ed81b525?at=3578
2018-12-16 10:48:52 +10:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland fe1d542b54 RenderClientAdapter - Add missing OVERRIDE statements 2018-08-16 19:38:17 +10:00
Igor 0ede12e7ba Add OSR AccessiblityHandler. (#2480)
* Add AccessibilityHander.

Implement CefAccessibilityHandler. Add IAccessibilityHandler interface. Add AccessibilityHandler field to IWebBrowser.

* Pull request fixes.

Replaces tabs with spaces; move CefAccessibilityHandler implementation to RenderClientAdapter; add missing comments.

* Add CefValueWrapper.

Add ICefValue interface; pass ICefValue to IAccessibilityHandler.

* Pull request fixes.

Rename CefValue to Value and CefValueType to ValueType; add CefValueWrapper::GetObject() method; remove stub code in AccessibilityHandler; fix comment on IAccessibilityHandler.

* Pull request fixes.

Fix comments for IValue; remove redundant global namespace reference for CefValueType.
2018-08-16 19:33:02 +10:00
amaitland bb67b6e9c3 Untabify RenderClientAdapter 2018-08-07 19:48:05 +10:00
amaitland a7c738456c WPF/OffScreen - Add missing ScreenInfo values
Change to using Rect struct

Follow up to #2474
2018-08-02 13:22:41 +10:00
alfein 391fe825d4 GetScreenInfo - Allow setting of Rect/AvaliableRect (#2474)
* added some code to send monitor information back to the cef

* reverted framework target change

* small cleanup.  Handling location changed of the window to force refresh screeninfo

* Fixed formatting of C++ code, added comments, removed code from samples

* removed extra white space
2018-08-02 13:21:02 +10:00
amaitland 90c5e71aeb WPF/OffScreen - Removed ViewRect and replaced with existing Rect (struct)
IRenderWebBrowser.GetViewRect didn't allow you to return the x and y coordinates

This is a breaking change
2018-06-27 19:54:41 +10:00
nicholas-str 22b299e3b5 OnPopupSize - fix incorrect ordering of Rect params
OnPopupSize - fix incorrect ordering of Rect params
2018-05-10 12:08:24 +10:00
amaitland c1b89c62e9 WPF/OffScreen - Code cleanup and minor refactor
IRenderWebBrowser - Method naming now matches CEF, xmldoc updated to be more accurate

CefSharp.Wpf.ChromiumWebBrowser and CefSharp.OffScreen.ChromiumWebBrowser both updated as a result of IRenderWebBrowser changes
Should be minimal public API changes, should only require changes for those that are implementing their own rendering, who will have a major rewrite on their hands regardless of this.
2018-04-20 14:49:25 +10:00
amaitland 127c00554f Rewrite WPF/OffScreen OnPaint
OffScreen
  - Now maintains a raw Byte[] buffer that is used to create the GDI bitmaps
can be overridden and raw buffer access granted (eliminates the forced memory copy to the memory mapped view)

WPF
  - MemoryMappedFile.CreateNew is now used to create the in memory view and copy the buffer
  - InteropBitmapFactory only create new MemoryMappedFile selectively. If the MemoryMappedFile is larger than we require then just reuse it rather than
    releasing then allocating a smaller section of memory that's used for double buffering with InteropBitmap and WritableBitmap
  - Removed CefDirtyRect and used existing Rect class
  - Rename rendering event to Paint, still preferable to implement IBitmapFactory or subclass ChromiumWebBrowser
  - Update ChromiumWebBrowserWithScreenshotSupport to support new rendering method - not very well tested.

Resolves #2237
2018-01-18 11:29:12 +10:00
amaitland 7b48980611 Remove CefDirtyRect
Replace with Rect as the structs were identical
2017-12-21 08:56:02 +10:00
amaitland c2891c5d1e Add protected virtual methods for the most common IRenderWebBrowser methods that users would need to override.
Still maintain the explicit interface methods - prefer the additional compiler checks and readability
Rename IRenderWebBrowser.InvokeRenderAsync to OnPaint - keeps inline with CEF naming
Added better comments to IRenderWebBrowser.OnPaint
2017-05-29 13:33:50 +10:00
amaitland ef27fb5cf0 Enable implementation of GetScreenPoint (was commented out)
Looks like the Point returned from PointToScreen is pre-scaled, so no need to perform a Transform
2017-04-19 12:23:13 +10:00
Chris 96d583c361 Used an array rather then creating a list then calling ToArray 2017-04-13 15:52:49 +02:00
amaitland 3bc9ca1898 Move Enums into their own folder (again not changing the namespace as to avoid breaking the public API, at least for now)
Add copyright disclaimer to JavascriptResponse
Remove Kernel32.OutputDebugString calls and replace with Debug.WriteLine
Removed ScriptException and ResponseAction - unused classes
Rename CefCursorType to CursorType - wasn't exposed as part of the public API so can rename
2017-03-21 10:05:38 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland 64c6f4410a Update GetScreenPoint - still not ready for use as there has been limited testing 2017-01-30 09:39:11 +10:00
Alex Maitland 08d6fa902b GetScreenPoint changes not ready
Comment out code
2017-01-28 12:46:31 +10:00
amaitland d4ef1519b9 Add IRenderWebBrowser.GetScreenPoint - basic WPF implementation 2017-01-18 07:26:05 +10:00
amaitland fdd08896d7 Expose the IME methods/callback added with https://bitbucket.org/chromiumembedded/cef/commits/f7014be
It should now be possible for someone to implement IME support in the WPF control to resolve #1262
2016-12-14 07:32:03 +10:00
amaitland d6f44844a1 Update RenderClientAdapter reference url - CEF project structure changed 2016-03-15 10:46:50 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland b9ee476e8e Fix up some of the vc++ include mess that we had going
Cleanup using namespace statements as well
2015-09-29 16:26:06 +10:00
amaitland 4a1b4aba18 Remove stray semi colon 2015-09-01 22:07:43 +10:00
amaitland 36bf1c5c58 Refactor GetScreenInfo - add GetViewRect method so closer match cefclient example
Add note about GetViewRect
2015-08-26 20:13:07 +10:00
amaitland 7794fb2712 Remove scaledWidth, scaledHeight just use the values directly 2015-08-26 15:25:15 +10:00
amaitland a3c3d6c51f Untabify RenderClientAdapter
Remove GetPixelPosition method - inline code
Remove redundant else branch from BitmapFactory
2015-08-26 15:21:38 +10:00
amaitland 73e01e09e6 Merge branch 'features/HighDpiAgain' of https://github.com/bjarteskogoy/CefSharp 2015-08-26 15:18:29 +10:00
Bjarte Skogøy 0c2b0ae7f7 Device/logical coordinates stuff. Now mouse positions and popups are behaving properly. 2015-08-21 10:23:55 +02:00
Bjarte Skogøy 276c05195e Spaces instead of tabs. 2015-08-21 08:58:57 +02:00
mmamone dba5cc4690 Updates post review
Updated the naming conventions in RenderClientAdapter.
Used a DataObject for the drag data (in order to handle text, html, etc
...).
In the future, can support images once GetFileContents is
implemented.
2015-08-20 09:34:32 +10:00
Bjarte Skogøy d68039db3c Seems like the bitmapInfo sent to ReleaseBitmapHandlers sometimes is NULL. 2015-08-19 08:18:02 +02:00
mmamone cb96ce1437 Implement start drag for WPF browser
Exposed the necessary functions for start drag to work:
* StartDragging (RenderClientAdapter)
* OnDragSourceEndedAt (ManagedCefBrowserAdapter)
* OnDragSourceSystemDragEnded (ManagedCefBrowserAdapter)

Implemented IRenderWebBrowser.StartDragging for the WPF
ChromiumWebBrowser.

TODO: Would like to add an adorner layer for the dragged text (using the
supplied fragment html), but feels like a project for later.
2015-08-19 13:03:18 +10:00
Bjarte Skogøy 9834bee0d3 Seems to scale properly now. 2015-08-18 23:48:25 +02:00
Bjarte Skogøy c7c0dad0d4 Init bitmap infos when scale info is available 2015-08-18 23:33:10 +02:00
Bjarte Skogøy 4bbd9e7b09 A start. Need to test popups and test on high dpi screen. 2015-08-18 14:17:20 +02:00
Bill Tutt bceb3db4c5 Merge remote-tracking branch 'origin/cef/2272' into cef/2272 2015-05-28 23:17:59 -04:00
Bill Tutt 12c330ad92 Merge remote-tracking branch 'origin/master' into cef/2272 2015-05-28 23:14:54 -04:00
Matthew Morrison 890b80bc0f Fixed some issues with formatting. 2015-05-23 17:46:06 -05:00
Matthew Morrison f7f13f0359 Add cursor type to SetCursor call. Duplicated CursorType enum from CEF source. 2015-05-22 19:40:40 -05:00
amaitland 8a53dfe54d Pass the IBrowserAdapter (ManagedCefBrowserAdapter) reference directly into the ClientAdapter instance 2015-05-21 13:57:17 +10:00
Bill Tutt c08b1ff38e Fix some review comments, and add frameloadstart/end/error related methods to IPopupHandler. 2015-05-20 22:59:43 -04:00
Bill Tutt 80d6ae12e5 Merge remote-tracking branch 'origin/cef/2272' into CefSharpBrowserWrapper 2015-05-20 21:54:31 -04:00
amaitland 16616d924f Add missing DECL (__declspec(dllexport)) to OnPopupSize 2015-05-21 09:05:07 +10:00
Bill Tutt adb5ae0d77 More work on wrapping CefBrowser/CefFrame. 2015-05-17 17:41:44 -04:00