This is unhelpful, but maybe better than nothing: I tried using LoadAlternateHTMLString once and also ran into problems. I believe it's intended for alternative HTML for the current URL of the page -- aka the "error" pages.
Elsewhere in Chrome we just hook up fake network providers and navigate webkit to magic urls like "chrome://newtab/". You can read the code for those to see how they work. On Fri, May 22, 2009 at 3:17 PM, John Gregg <[email protected]> wrote: > I'm trying to load a static HTML string into a small render view (for the > purpose of desktop notifications), and I came across the method > RenderViewHost::LoadAlternateHTMLString, which, based on the name, sounds > like what I want. > > I have things working the way I want if I call rvh->NavigateToURL(url): it > loads the remote URL into my view. But if I replace that call with > rvh->LoadAlternateHTMLString(L"Hello World", false, GURL(), "") [the > comments say the last two arguments are ignored if the second argument is > false], I get strange behavior: my notification view is empty, and a new tab > opens to "chrome://chromewebdata/" and displays an INVALID_URL error. Btw, > the same thing happens if I replace "Hello World" with valid HTML. > > I've tried debugging this but nothing obvious is jumping out as a problem. > Any advice on what I might be doing wrong? Is there a better way to load > static HTML into a RenderView? > > Thanks, > -John > > > > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
