Step 4 is wrong, you don't replace in-place, you do a navigation, like
view-source.

Random idea; the page's could be duplicated in a hidden iframe with
javascript disabled, greatly simplifying the code to generated the print
preview pages jpg and making the DOM duplication a 100% javascript issue. I
don't know if that can be safely done merely with javascript, that would be
awesome.

Only caveat, print preview would be disabled when javascript is disabled.

We need to find a way to not make the printed pages preview jump to the
browser, that would be (slightly) insane.

M-A

On Sep 15, 2009 10:32 PM, "Mohamed Mansour" <[email protected]>
wrote:

Hi all,

I am having trouble trying to figure out how I could replace the contents of
a specific WebFrame while I am in RenderView with a custom DOMUI page that I
have created.

Here is a scenario:

   1. User visits http://www.google.com
   2. User waits till page is done loading
   3. User selects Options > Print Preview
   4. The current page will be replaced with a custom PrintPreview DOMUI
   page (print:http://www.google.com)  where I would be passing some Data
   such as a vector of bytes (image) from RenderView to PrintPreviewDOMUI

I have created the DOMUI page and made sure it works, and created the bitmap
and encoded it with JPEGEncoder, but I am clueless on how the connection
would be from RenderView to DOMUI.
Any assistance is appreciated. The reason why I want to replace the current
contents is because print preview depends on what is exactly visible at that
time. Unless there is a better way.

Thanks in advance!

- Mohamed Mansour


--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to