FYI: I just recently added WebFrame::GetFullPageHtml() for print selection
support. This could come in handy for debugging. But Brett is right you
need to be in the renderer process for that. The alternate is simply to
select everything on the page and do a copy. You can do that from the
browser process.
Sverrir
On Sun, Jun 7, 2009 at 2:38 AM, Brett Wilson wrote:
>
> On Sat, Jun 6, 2009 at 11:13 PM, meryl
> wrote:
> >
> > Hi,
> >
> > I add debug print status in BrowserRenderProcessHost::OnPageContents
> > () to print out the value of 'contents'
> >
> > void BrowserRenderProcessHost::OnPageContents(const GURL& url,
> > int32 page_id,
> > const std::wstring& contents);
> > // original code
> >
> > // I add this:
> > cout << " BrowserRenderProcessHost::OnPageContents" << endl;
> >cout << " <" << endl;
> >
> >cout << contents;
> >
> >cout << " <" << endl;
> >
> > }
> >
> > My question is why I only see the 'Text' of the page? I tried loading
> > www.google.ca, but I only see these values:
>
> I'm assuming your question is why it doesn't also contain the HTML...
>
> This function is called by the renderer with the text of the page so
> we can index it for history search. As a result, it contains only the
> text, since we don't want to index the HTML.
>
> If you have code that needs to get the full HTML of the page, you need
> to be in the renderer process and walk the DOM yourself.
>
> Brett
>
> >
>
--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com
View archives, change email options, or unsubscribe:
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---