mac: Add color chooser dialog

This commit is contained in:
Cheng Zhao 2014-10-31 22:53:15 +08:00
parent a4a390b2cc
commit 14c9a2a087
6 changed files with 202 additions and 2 deletions

View file

@ -18,8 +18,7 @@ class AtomBrowserClient : public brightray::BrowserClient {
protected:
// content::ContentBrowserClient:
void RenderProcessWillLaunch(
content::RenderProcessHost* host) override;
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
content::SpeechRecognitionManagerDelegate*
GetSpeechRecognitionManagerDelegate() override;
content::AccessTokenStore* CreateAccessTokenStore() override;

View file

@ -31,6 +31,7 @@
#include "brightray/browser/inspectable_web_contents.h"
#include "brightray/browser/inspectable_web_contents_view.h"
#include "chrome/browser/printing/print_view_manager_basic.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_entry.h"
@ -484,6 +485,13 @@ void NativeWindow::BeforeUnloadFired(content::WebContents* tab,
}
}
content::ColorChooser* NativeWindow::OpenColorChooser(
content::WebContents* web_contents,
SkColor color,
const std::vector<content::ColorSuggestion>& suggestions) {
return chrome::ShowColorChooser(web_contents, color);
}
void NativeWindow::RunFileChooser(content::WebContents* web_contents,
const content::FileChooserParams& params) {
if (!web_dialog_helper_)

View file

@ -230,6 +230,10 @@ 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,