OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace content { | 33 namespace content { |
34 class BrowserContext; | 34 class BrowserContext; |
35 class ColorChooser; | 35 class ColorChooser; |
36 class DownloadItem; | 36 class DownloadItem; |
37 class JavaScriptDialogManager; | 37 class JavaScriptDialogManager; |
38 class PageState; | 38 class PageState; |
39 class RenderViewHost; | 39 class RenderViewHost; |
40 class WebContents; | 40 class WebContents; |
41 class WebContentsImpl; | 41 class WebContentsImpl; |
| 42 struct ColorSuggestion; |
42 struct ContextMenuParams; | 43 struct ContextMenuParams; |
43 struct DropData; | 44 struct DropData; |
44 struct FileChooserParams; | 45 struct FileChooserParams; |
45 struct NativeWebKeyboardEvent; | 46 struct NativeWebKeyboardEvent; |
46 struct Referrer; | 47 struct Referrer; |
47 struct SSLStatus; | 48 struct SSLStatus; |
48 } | 49 } |
49 | 50 |
50 namespace gfx { | 51 namespace gfx { |
51 class Point; | 52 class Point; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 // NavigationController has configured its pending entry, but it has not yet | 331 // NavigationController has configured its pending entry, but it has not yet |
331 // been committed. | 332 // been committed. |
332 virtual void DidNavigateToPendingEntry(WebContents* source) {} | 333 virtual void DidNavigateToPendingEntry(WebContents* source) {} |
333 | 334 |
334 // Returns a pointer to a service to manage JavaScript dialogs. May return | 335 // Returns a pointer to a service to manage JavaScript dialogs. May return |
335 // NULL in which case dialogs aren't shown. | 336 // NULL in which case dialogs aren't shown. |
336 virtual JavaScriptDialogManager* GetJavaScriptDialogManager(); | 337 virtual JavaScriptDialogManager* GetJavaScriptDialogManager(); |
337 | 338 |
338 // Called when color chooser should open. Returns the opened color chooser. | 339 // Called when color chooser should open. Returns the opened color chooser. |
339 // Ownership of the returned pointer is transferred to the caller. | 340 // Ownership of the returned pointer is transferred to the caller. |
340 virtual ColorChooser* OpenColorChooser(WebContents* web_contents, | 341 virtual ColorChooser* OpenColorChooser( |
341 SkColor color); | 342 WebContents* web_contents, |
| 343 SkColor color, |
| 344 const std::vector<ColorSuggestion>& suggestions); |
342 | 345 |
343 // Called when a file selection is to be done. | 346 // Called when a file selection is to be done. |
344 virtual void RunFileChooser(WebContents* web_contents, | 347 virtual void RunFileChooser(WebContents* web_contents, |
345 const FileChooserParams& params) {} | 348 const FileChooserParams& params) {} |
346 | 349 |
347 // Request to enumerate a directory. This is equivalent to running the file | 350 // Request to enumerate a directory. This is equivalent to running the file |
348 // chooser in directory-enumeration mode and having the user select the given | 351 // chooser in directory-enumeration mode and having the user select the given |
349 // directory. | 352 // directory. |
350 virtual void EnumerateDirectory(WebContents* web_contents, | 353 virtual void EnumerateDirectory(WebContents* web_contents, |
351 int request_id, | 354 int request_id, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // Called when |this| is no longer the WebContentsDelegate for |source|. | 450 // Called when |this| is no longer the WebContentsDelegate for |source|. |
448 void Detach(WebContents* source); | 451 void Detach(WebContents* source); |
449 | 452 |
450 // The WebContents that this is currently a delegate for. | 453 // The WebContents that this is currently a delegate for. |
451 std::set<WebContents*> attached_contents_; | 454 std::set<WebContents*> attached_contents_; |
452 }; | 455 }; |
453 | 456 |
454 } // namespace content | 457 } // namespace content |
455 | 458 |
456 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 459 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |