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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 } | 45 } |
46 | 46 |
47 namespace history { | 47 namespace history { |
48 class HistoryAddPageArgs; | 48 class HistoryAddPageArgs; |
49 } | 49 } |
50 | 50 |
51 namespace webkit_glue { | 51 namespace webkit_glue { |
52 struct WebIntentData; | 52 struct WebIntentData; |
53 } | 53 } |
54 | 54 |
55 namespace WebKit { | |
56 typedef unsigned WebColor; | |
57 } | |
58 | |
55 namespace content { | 59 namespace content { |
56 | 60 |
57 struct OpenURLParams; | 61 struct OpenURLParams; |
58 | 62 |
59 // Objects implement this interface to get notified about changes in the | 63 // Objects implement this interface to get notified about changes in the |
60 // WebContents and to provide necessary functionality. | 64 // WebContents and to provide necessary functionality. |
61 class CONTENT_EXPORT WebContentsDelegate { | 65 class CONTENT_EXPORT WebContentsDelegate { |
62 public: | 66 public: |
63 WebContentsDelegate(); | 67 WebContentsDelegate(); |
64 | 68 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 // Invoked when navigating to a pending entry. When invoked the | 314 // Invoked when navigating to a pending entry. When invoked the |
311 // NavigationController has configured its pending entry, but it has not yet | 315 // NavigationController has configured its pending entry, but it has not yet |
312 // been committed. | 316 // been committed. |
313 virtual void DidNavigateToPendingEntry(WebContents* tab) {} | 317 virtual void DidNavigateToPendingEntry(WebContents* tab) {} |
314 | 318 |
315 // Returns a pointer to a service to create JavaScript dialogs. The default | 319 // Returns a pointer to a service to create JavaScript dialogs. The default |
316 // pointer returned is to a stub service that marks all dialogs as suppressed | 320 // pointer returned is to a stub service that marks all dialogs as suppressed |
317 // and displays nothing. | 321 // and displays nothing. |
318 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator(); | 322 virtual JavaScriptDialogCreator* GetJavaScriptDialogCreator(); |
319 | 323 |
324 virtual void OpenColorChooser(WebContents* tab, | |
jam
2012/01/27 18:13:40
ditto
keishi
2012/02/06 15:01:57
Done.
| |
325 const WebKit::WebColor& color) {} | |
326 virtual void EndColorChooser(WebContents* tab) {} | |
327 virtual void SetSelectedColorInColorChooser(WebContents* tab, | |
328 const WebKit::WebColor& color) {} | |
329 | |
320 // Called when a file selection is to be done. | 330 // Called when a file selection is to be done. |
321 virtual void RunFileChooser(WebContents* tab, | 331 virtual void RunFileChooser(WebContents* tab, |
322 const FileChooserParams& params) {} | 332 const FileChooserParams& params) {} |
323 | 333 |
324 // Request to enumerate a directory. This is equivalent to running the file | 334 // Request to enumerate a directory. This is equivalent to running the file |
325 // chooser in directory-enumeration mode and having the user select the given | 335 // chooser in directory-enumeration mode and having the user select the given |
326 // directory. | 336 // directory. |
327 virtual void EnumerateDirectory(WebContents* tab, | 337 virtual void EnumerateDirectory(WebContents* tab, |
328 int request_id, | 338 int request_id, |
329 const FilePath& path) {} | 339 const FilePath& path) {} |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
398 // Called when |this| is no longer the WebContentsDelegate for |source|. | 408 // Called when |this| is no longer the WebContentsDelegate for |source|. |
399 void Detach(WebContents* source); | 409 void Detach(WebContents* source); |
400 | 410 |
401 // The WebContents that this is currently a delegate for. | 411 // The WebContents that this is currently a delegate for. |
402 std::set<WebContents*> attached_contents_; | 412 std::set<WebContents*> attached_contents_; |
403 }; | 413 }; |
404 | 414 |
405 } // namespace content | 415 } // namespace content |
406 | 416 |
407 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 417 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |