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 namespace content { | 32 namespace content { |
33 class BrowserContext; | 33 class BrowserContext; |
34 class ColorChooser; | 34 class ColorChooser; |
35 class DownloadItem; | 35 class DownloadItem; |
36 class JavaScriptDialogManager; | 36 class JavaScriptDialogManager; |
37 class PageState; | 37 class PageState; |
38 class RenderViewHost; | 38 class RenderViewHost; |
39 class SessionStorageNamespace; | 39 class SessionStorageNamespace; |
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 // NavigationController has configured its pending entry, but it has not yet | 327 // NavigationController has configured its pending entry, but it has not yet |
327 // been committed. | 328 // been committed. |
328 virtual void DidNavigateToPendingEntry(WebContents* source) {} | 329 virtual void DidNavigateToPendingEntry(WebContents* source) {} |
329 | 330 |
330 // Returns a pointer to a service to manage JavaScript dialogs. May return | 331 // Returns a pointer to a service to manage JavaScript dialogs. May return |
331 // NULL in which case dialogs aren't shown. | 332 // NULL in which case dialogs aren't shown. |
332 virtual JavaScriptDialogManager* GetJavaScriptDialogManager(); | 333 virtual JavaScriptDialogManager* GetJavaScriptDialogManager(); |
333 | 334 |
334 // Called when color chooser should open. Returns the opened color chooser. | 335 // Called when color chooser should open. Returns the opened color chooser. |
335 // Ownership of the returned pointer is transferred to the caller. | 336 // Ownership of the returned pointer is transferred to the caller. |
336 virtual ColorChooser* OpenColorChooser(WebContents* web_contents, | 337 virtual ColorChooser* OpenColorChooser( |
337 SkColor color); | 338 WebContents* web_contents, |
| 339 SkColor color, |
| 340 const std::vector<ColorSuggestion>& suggestions); |
338 | 341 |
339 // Called when a file selection is to be done. | 342 // Called when a file selection is to be done. |
340 virtual void RunFileChooser(WebContents* web_contents, | 343 virtual void RunFileChooser(WebContents* web_contents, |
341 const FileChooserParams& params) {} | 344 const FileChooserParams& params) {} |
342 | 345 |
343 // Request to enumerate a directory. This is equivalent to running the file | 346 // Request to enumerate a directory. This is equivalent to running the file |
344 // chooser in directory-enumeration mode and having the user select the given | 347 // chooser in directory-enumeration mode and having the user select the given |
345 // directory. | 348 // directory. |
346 virtual void EnumerateDirectory(WebContents* web_contents, | 349 virtual void EnumerateDirectory(WebContents* web_contents, |
347 int request_id, | 350 int request_id, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // Called when |this| is no longer the WebContentsDelegate for |source|. | 463 // Called when |this| is no longer the WebContentsDelegate for |source|. |
461 void Detach(WebContents* source); | 464 void Detach(WebContents* source); |
462 | 465 |
463 // The WebContents that this is currently a delegate for. | 466 // The WebContents that this is currently a delegate for. |
464 std::set<WebContents*> attached_contents_; | 467 std::set<WebContents*> attached_contents_; |
465 }; | 468 }; |
466 | 469 |
467 } // namespace content | 470 } // namespace content |
468 | 471 |
469 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 472 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |