yueying0083 / javachromiumembedded

Automatically exported from code.google.com/p/javachromiumembedded
0 stars 0 forks source link

Added CefDialogHandler to deal with file dialogs #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This issue is an enhancement of JCEF - STEP 2  (patch 4 of 15) 
--------------------------------------------------------------
Please see issue 55 for the overall plan.

Purpose: Added CefDialogHandler to deal with file dialogs

This patch relies on the attached patch file of issue #61. 
If you want to try these code changes, add the patch of issue #61 first and 
afterwards add the patch file attached to this issue. Otherwise you'll get some 
patch-errors.

This patch adds the CEF handler CefDialogHandler to the JCEF code. 

Original issue reported on code.google.com by k...@censhare.de on 21 Mar 2014 at 1:22

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 28 Mar 2014 at 10:05

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 28 Mar 2014 at 1:17

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 28 Mar 2014 at 1:17

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 28 Mar 2014 at 1:30

GoogleCodeExporter commented 9 years ago
This is an updated patch file for this issue due there have been several 
changes within r40.

This patch relies on the attached patch file of issue #61.

Original comment by k...@censhare.de on 17 Apr 2014 at 7:44

Attachments:

GoogleCodeExporter commented 9 years ago
Added in revision 45.

A few comments:

1. There's one minor problem in the MainFrame.java example. SaveAs doesn't 
close the PrintWriter after visit is called so Java continues to hold a lock on 
the written file.

2. In CefDialogHandler.onFileDialog why not use String[] instead of 
Vector<String> for |acceptTypes|?

Original comment by magreenb...@gmail.com on 28 Apr 2014 at 6:01

GoogleCodeExporter commented 9 years ago
@comment #5:
Fixed 1) within attached patch file

According 2): Maybe using a string array makes the implementation somewhat 
simpler, that's right. But I tried to stay as close as possible to the native 
counterpart method CefDialogHandler::OnFileDialog which uses 
std::vector<CefString> as type.

Original comment by k...@censhare.de on 28 May 2014 at 8:09

Attachments:

GoogleCodeExporter commented 9 years ago
@#7.1: Thanks, added in revision 75.

@#7.2: We have to use containers to represent string arrays in C++ because we 
don't get native support for them. In Java we can use String[] instead and get 
(potentially) better performance/usability. It's not a big issue but I think we 
should consider taking advantage of language features if/when it improves the 
API.

Original comment by magreenb...@gmail.com on 17 Jun 2014 at 4:28