Commit Graph

6179 Commits

Author SHA1 Message Date
Per Lundberg cfcd3e4c8a I give up with this one. It makes more sense to have this as a string after all, so then we might as well use the previous name (Address). The "SetAddress" method is internal and shouldn't really be used from the outside. We might be closing in to the point where we should split IWebBrowser into two parts - IWebBrowser (which is exposed to external consumers) and IWebBrowserInternal (an internal interface mostly needed between CefSharp and CefSharp.Wpf/CefSharp.WinForms). 2013-07-29 09:47:51 +03:00
Per Lundberg c88774a581 Duh… "Thou shalt not copy and paste code blindly from the internets". Obviously, it was a bit broken this time. :) 2013-07-29 09:33:24 +03:00
Per Lundberg 27d51ae238 Bug fix for SendKeyEvent. Should always return something. 2013-07-29 09:21:20 +03:00
Per Lundberg 1d06025894 Further fix for #140; it didn't work correctly if you would e.g. press Shift-F5 in Visual Studio to stop the process. Hooking Application.Current.Exit is better in this regard than handling WM_CLOSE. 2013-07-29 09:20:59 +03:00
Per Lundberg 5bcfc51414 Improved the reliability of the code to better handle cases when things happen "out of order", or at least in another order than we are expecting. (which is often the case when using data binding etc) 2013-07-28 22:47:50 +03:00
Per Lundberg 3dcae11505 Need to set the RemoteDebuggingPort when initializing CEF, to be able to use the devtools. This code will have to be slightly refactored if/when we skip the Presenter approach entirely for the WPF example. 2013-07-28 22:46:39 +03:00
Per Lundberg 73787825fb Let's try to do things in a more MVVM-orthodox way. This is one of the first steps on a quite long journey I believe… The previous CefSharp.Wpf.Example was (in my opinion) slightly badly designed in that it too much tried to "reuse" code between the WPF and WinForms examples. Now, this is good from a CefSharp maintainability standpoint, but it really means that you will "dumb down" the WPF one in a way that feels very unnatural to me. WPF is WPF and should be done in a certain way (to take advantage of the platform), and WinForms is an entirely different beast. So, I feel that it is very much OK if these sample apps diverge much more, so that we demonstrate CefSharp usage in a more realistic, close-to-real-life way than has been the case before. 2013-07-28 22:45:28 +03:00
Per Lundberg b2d214f9e1 Started working on the DevTools stuff, which is seemingly non-trivial since we can no longer just call a method but need to open up the devtools URL ourselves. 2013-07-28 22:05:38 +03:00
Per Lundberg 246d3edc94 Made the OnLostFocus a bit safer when shutting down the app and cefBrowserWrapper may be null. 2013-07-28 22:04:33 +03:00
Per Lundberg ac9d1cfeb0 Added the RemoteDebuggingPort, which is needed to get the DevTools working w/ CEF3. 2013-07-27 21:40:15 +03:00
Per Lundberg 85f2778d63 Sorted the properties alphabetically, to make it more maintainable. 2013-07-27 21:36:34 +03:00
Per Lundberg 33dc7460d3 Renamed the class also, since "Settings" isn't really clear enough IMHO. 2013-07-27 21:33:47 +03:00
Per Lundberg 0701d40264 Settings.h is now CefSettings.h 2013-07-27 21:27:25 +03:00
Per Lundberg b2418b00b1 RenderClientAdapter is now CefBrowserWrapper, and RenderClientAdapterInternal has been freed of the quite pointless "Internal" suffix. 2013-07-27 19:23:54 +03:00
Per Lundberg fb620a2da4 Don't explicitly delete the object since it's being refcounted, which means that the destructor runs twice if we delete it manually. Hopefully closes #140. 2013-07-27 19:15:44 +03:00
Per Lundberg 3df09291a2 InvokeRender isn't used any more, now that #146 is (hopefully) resolved. 2013-07-27 19:05:00 +03:00
Per Lundberg acc09dda55 This one should also be included (it was already referred to). 2013-07-27 19:02:49 +03:00
Per Lundberg 745c2d9bd5 Hopefully fixes #146 for good. 2013-07-27 13:46:31 +03:00
Per Lundberg e3685e4305 Attempted improvement on #140. 2013-07-27 13:44:16 +03:00
Per Lundberg 10a733059b Tried to fix #146, but we're not really there yet unfortunately... 2013-07-27 10:27:12 +03:00
Per Lundberg bd3f2a8cf0 Let's be kind and dispose stuff that is actually disposable. 2013-07-26 23:24:17 +03:00
Per Lundberg b705105ad8 Second part of IDisposable scrapping. We didn't really use the Disposable pattern for anything else than forcing our implementors to implement it, it seems. 2013-07-26 23:01:35 +03:00
Per Lundberg 8849f41e38 Ooops. Scrapped some dead code. I hate dead code. I eat it for breakfast. Even when I'm on vacation. 2013-07-26 22:54:25 +03:00
Per Lundberg d19db2f631 Let's not pretend to play the IDisposable game. It's not really supported for WPF controls anyway. 2013-07-26 22:52:27 +03:00
Per Lundberg 65085d6221 Added code to handle window close in a better way. This got a bit awkward since we have to run some code reasonably early; earlier than we are able with e.g. Dispatcher.ShutdownStarted and similar… We probably have to have some Unloaded() code nonetheless, to not leak so incredibly much memory. ;-) But that have to be fixed a bit later. Closes: #140. 2013-07-26 22:51:45 +03:00
Per Lundberg 28bc0414e2 Fixed the order of these. 2013-07-26 22:11:41 +03:00
Per Lundberg 005b81d8aa Fixed keyboard input support. Closes #143. 2013-07-26 14:11:23 +03:00
Per Lundberg 531bda22c6 Added back the focus handling (#3). 2013-07-24 22:33:02 +03:00
Per Lundberg 10b6b75d3a Trivial cleanup. 2013-07-24 22:25:52 +03:00
Per Lundberg 2faab36711 Closes #6. 2013-07-24 22:24:01 +03:00
Per Lundberg 709fa1237f Whitespace? 2013-07-24 10:04:15 +03:00
Per Lundberg e974c3ed7f …and use more opacity. 2013-07-24 10:03:55 +03:00
Per Lundberg ba0c078abc Make the window a bit bigger by default. 2013-07-24 10:03:29 +03:00
Per Lundberg 1aa2627495 Use the VS hosting process. 2013-07-24 10:03:16 +03:00
Per Lundberg 3e778a0803 Disabled stuff which isn't working properly at the moment, and made the URL textbox at least *display* the current URL being browsed to... 2013-07-24 10:03:02 +03:00
Per Lundberg 002389ff0f Started working on the Dispose() stuff. Very much unfinished yet. 2013-07-24 09:54:32 +03:00
Per Lundberg 2c687560c3 Propagate the mouse events over to CEF. 2013-07-24 09:54:15 +03:00
Per Lundberg e478112993 Dropped explicit public. 2013-07-24 09:37:53 +03:00
Per Lundberg 5ace4ade2b Fixed SetCursor() to work properly even when called from a background thread. 2013-07-24 09:15:58 +03:00
Per Lundberg 8a8f888e8d Missed parts of the resize code (the part that actually detects the resize and informs CEF). 2013-07-24 09:15:17 +03:00
Per Lundberg 29bc05fab1 Made the exposure of CefBrowserHost more generic, since we will use it for many other use cases shortly. 2013-07-23 23:09:12 +03:00
Per Lundberg 192d72e5f0 Added support for resizing. Doesn't work fully, throws exceptions sometimes, but it's at least a start. 2013-07-23 22:58:59 +03:00
Per Lundberg c6fbd4e7e7 Silly bug: ActualWidth and ActualHeight wasn't really distinguished between properly... 2013-07-23 22:58:04 +03:00
Per Lundberg 3d4a1f3bc4 Let's scrap these also, at least for the time being. Supporting them with CEF3 is semi-problematic, so let's remove them and then we can add them back if they are really needed (and we manage to figure out how to support it with CEF3). 2013-07-23 22:25:51 +03:00
Per Lundberg 7a30bd5b7e Let IRenderWebBrowser expose its width and height to the RenderClientAdapterInternal class, so we can let Chromium render in a bitmap of the right size. 2013-07-23 22:19:15 +03:00
Per Lundberg 2fe11224de Got rid of ContentsWidth and ContentsHeight, which seems hard (or at least non-obvious) to support w/ CEF3 and I don't really see why we need it in the first place. "Less software". :) 2013-07-23 22:17:22 +03:00
Per Lundberg c87e218f90 Started working on getting the actual painting to work. It now works, but only in a fixed-size region. :) Need to discuss a bit with the CEF guys on how to do this properly I think... 2013-07-23 19:30:53 +03:00
Per Lundberg f5fbf0cb95 Added some default return values, so we avoid compilation warnings. 2013-07-23 10:20:56 +03:00
Per Lundberg e569c4ef2b Again, moved the implementation to the header file. I think it would be OK to do this will all classes; it simplifies refactoring and decreases the logical gap between C# and C++. 2013-07-23 10:19:57 +03:00
Per Lundberg 646d79533d Added phony, very stupid implementation for now. Eventually we will have to do something much more fanciful, by querying the IRenderWebBrowser how big the view rectangle should be. (We also need to figure out how to handle resizes properly…) 2013-07-23 00:01:06 +03:00