Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1863)

Unified Diff: content/public/browser/browser_plugin_guest_delegate.h

Issue 280833003: <webview>: Move Color Chooser and File Chooser to Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_downloads_to_chorme
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/browser_plugin_guest_delegate.h
diff --git a/content/public/browser/browser_plugin_guest_delegate.h b/content/public/browser/browser_plugin_guest_delegate.h
index 6df0ef19a5f22e5ac6b21792d7c1fb7a29787c16..fd07b9db2fadc47fa7e0d776a0e27f791b3b3cf7 100644
--- a/content/public/browser/browser_plugin_guest_delegate.h
+++ b/content/public/browser/browser_plugin_guest_delegate.h
@@ -12,16 +12,20 @@
#include "content/common/content_export.h"
#include "content/public/common/browser_plugin_permission_type.h"
#include "content/public/common/media_stream_request.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/size.h"
#include "url/gurl.h"
namespace content {
+class ColorChooser;
class JavaScriptDialogManager;
+class WebContents;
+struct ColorSuggestion;
struct ContextMenuParams;
+struct FileChooserParams;
struct NativeWebKeyboardEvent;
-class WebContents;
// Objects implement this interface to get notified about changes in the guest
// WebContents and to provide necessary functionality.
@@ -141,6 +145,19 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
// NULL in which case dialogs aren't shown.
virtual JavaScriptDialogManager* GetJavaScriptDialogManager();
+ // Called when color chooser should open. Returns the opened color chooser.
+ // Returns NULL if we failed to open the color chooser (e.g. when there is a
+ // ColorChooserDialog already open on Windows). Ownership of the returned
+ // pointer is transferred to the caller.
+ virtual ColorChooser* OpenColorChooser(
+ WebContents* web_contents,
+ SkColor color,
+ const std::vector<ColorSuggestion>& suggestions);
+
+ // Called when a file selection is to be done.
+ virtual void RunFileChooser(WebContents* web_contents,
+ const FileChooserParams& params) {}
+
// Returns true if the context menu operation was handled by the delegate.
virtual bool HandleContextMenu(const ContextMenuParams& params);
};
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/public/browser/browser_plugin_guest_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698