ataranto / CefSharp

.Net binding for the Chromium Embedded Framework
Other
62 stars 34 forks source link

Implemented LoadHtml/LoadString #13

Closed kppullin closed 12 years ago

kppullin commented 12 years ago

Fully prepared to have this rejected : )

Basically I added a little bit of code to allow for invoking LoadString() on the CEF control.

It works, and I added a added a test method to the two example apps, but there are a few "issues" remaining to be aware of:

  1. I wanted to keep the naming consistent by using LoadString() everywhere. However, as far as I can tell, this clashed with the LoadString/LoadStringW defined in winuser.h and I've no idea how to work around this : ). Instead I named it LoadHtml.
  2. The CEF control appears to require a valid URL to be included with LoadString(). For my needs, I don't need this and hardcoded about:blank. If necessary I can change the definition to allow a user to specify a value.
  3. The file CefSharp.WinForms.Example/Browser.Designer.cs was changed a bunch by the Visual Studio designer. Again, something I can work around if needed.
ataranto commented 12 years ago

Thanks! Swamped at work this week, I'll take a look at this in a few days. Quick comments.

  1. I got bit by winuser.h defs recently, took me forever to figure out what was wrong.
  2. about:blank should be fine, I haven't actually dug down to see what some of the CEF api needs url params, but they seldom seem to have an effect.
  3. Eh, doesn't matter.
ataranto commented 12 years ago

merged, thanks.