Merge pull request #777 from atom/web-dialog

Implement file dialog and color chooser for <input> tag
This commit is contained in:
Cheng Zhao 2014-11-03 17:47:08 +08:00
commit 92cfd96933
14 changed files with 768 additions and 15 deletions

View file

@ -51,6 +51,7 @@ namespace atom {
class AtomJavaScriptDialogManager;
struct DraggableRegion;
class WebDialogHelper;
class NativeWindow : public brightray::DefaultWebContentsDelegate,
public brightray::InspectableWebContentsDelegate,
@ -229,6 +230,15 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
void BeforeUnloadFired(content::WebContents* tab,
bool proceed,
bool* proceed_to_fire_unload) override;
content::ColorChooser* OpenColorChooser(
content::WebContents* web_contents,
SkColor color,
const std::vector<content::ColorSuggestion>& suggestions) override;
void RunFileChooser(content::WebContents* web_contents,
const content::FileChooserParams& params) override;
void EnumerateDirectory(content::WebContents* web_contents,
int request_id,
const base::FilePath& path) override;
void RequestToLockMouse(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target) override;
@ -313,6 +323,7 @@ class NativeWindow : public brightray::DefaultWebContentsDelegate,
base::WeakPtrFactory<NativeWindow> weak_factory_;
scoped_ptr<WebDialogHelper> web_dialog_helper_;
scoped_ptr<AtomJavaScriptDialogManager> dialog_manager_;
// Notice that inspectable_web_contents_ must be placed after dialog_manager_,