Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 class ListValue; | 31 class ListValue; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace content { | 34 namespace content { |
| 35 class BrowserContext; | 35 class BrowserContext; |
| 36 class ColorChooser; | 36 class ColorChooser; |
| 37 class DownloadItem; | 37 class DownloadItem; |
| 38 class JavaScriptDialogManager; | 38 class JavaScriptDialogManager; |
| 39 class PageState; | 39 class PageState; |
| 40 class RenderViewHost; | 40 class RenderViewHost; |
| 41 struct SecurityStyleExplanations; | |
|
Charlie Reis
2015/06/18 20:39:51
nit: List with the structs, not the classes.
estark
2015/06/18 23:13:26
Done.
| |
| 41 class SessionStorageNamespace; | 42 class SessionStorageNamespace; |
| 42 class WebContents; | 43 class WebContents; |
| 43 class WebContentsImpl; | 44 class WebContentsImpl; |
| 44 struct ColorSuggestion; | 45 struct ColorSuggestion; |
| 45 struct ContextMenuParams; | 46 struct ContextMenuParams; |
| 46 struct DropData; | 47 struct DropData; |
| 47 struct FileChooserParams; | 48 struct FileChooserParams; |
| 48 struct NativeWebKeyboardEvent; | 49 struct NativeWebKeyboardEvent; |
| 49 struct Referrer; | 50 struct Referrer; |
| 50 struct SSLStatus; | 51 struct SSLStatus; |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 virtual void MoveValidationMessage(WebContents* web_contents, | 480 virtual void MoveValidationMessage(WebContents* web_contents, |
| 480 const gfx::Rect& anchor_in_root_view) {} | 481 const gfx::Rect& anchor_in_root_view) {} |
| 481 | 482 |
| 482 // Returns true if the WebContents is never visible. | 483 // Returns true if the WebContents is never visible. |
| 483 virtual bool IsNeverVisible(WebContents* web_contents); | 484 virtual bool IsNeverVisible(WebContents* web_contents); |
| 484 | 485 |
| 485 // Called in response to a request to save a frame. If this returns true, the | 486 // Called in response to a request to save a frame. If this returns true, the |
| 486 // default behavior is suppressed. | 487 // default behavior is suppressed. |
| 487 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); | 488 virtual bool SaveFrame(const GURL& url, const Referrer& referrer); |
| 488 | 489 |
| 489 // Can be overridden by a delegate to return the security style of the given | 490 // Can be overridden by a delegate to return the security style of the |
| 490 // |web_contents|. Returns SECURITY_STYLE_UNKNOWN if not overriden. | 491 // given |web_contents|, populating |security_style_explanations| to |
| 491 virtual SecurityStyle GetSecurityStyle(WebContents* web_contents); | 492 // explain why the SecurityStyle was downgraded. Returns |
| 493 // SECURITY_STYLE_UNKNOWN if not overriden. | |
| 494 virtual SecurityStyle GetSecurityStyle( | |
| 495 WebContents* web_contents, | |
| 496 SecurityStyleExplanations* security_style_explanations); | |
| 492 | 497 |
| 493 protected: | 498 protected: |
| 494 virtual ~WebContentsDelegate(); | 499 virtual ~WebContentsDelegate(); |
| 495 | 500 |
| 496 private: | 501 private: |
| 497 friend class WebContentsImpl; | 502 friend class WebContentsImpl; |
| 498 | 503 |
| 499 // Called when |this| becomes the WebContentsDelegate for |source|. | 504 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 500 void Attach(WebContents* source); | 505 void Attach(WebContents* source); |
| 501 | 506 |
| 502 // Called when |this| is no longer the WebContentsDelegate for |source|. | 507 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 503 void Detach(WebContents* source); | 508 void Detach(WebContents* source); |
| 504 | 509 |
| 505 // The WebContents that this is currently a delegate for. | 510 // The WebContents that this is currently a delegate for. |
| 506 std::set<WebContents*> attached_contents_; | 511 std::set<WebContents*> attached_contents_; |
| 507 }; | 512 }; |
| 508 | 513 |
| 509 } // namespace content | 514 } // namespace content |
| 510 | 515 |
| 511 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 516 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |