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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 | 26 |
| 27 namespace base { | 27 namespace base { |
| 28 class ListValue; | 28 class ListValue; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace content { | 31 namespace content { |
| 32 class BrowserContext; | 32 class BrowserContext; |
| 33 class ColorChooser; | 33 class ColorChooser; |
| 34 class DownloadItem; | 34 class DownloadItem; |
| 35 class JavaScriptDialogCreator; | 35 class JavaScriptDialogCreator; |
| 36 struct Referrer; | |
| 36 class RenderViewHost; | 37 class RenderViewHost; |
| 37 class WebContents; | 38 class WebContents; |
| 38 class WebIntentsDispatcher; | 39 class WebIntentsDispatcher; |
| 39 struct ContextMenuParams; | 40 struct ContextMenuParams; |
| 40 struct FileChooserParams; | 41 struct FileChooserParams; |
| 41 struct SSLStatus; | 42 struct SSLStatus; |
| 42 } | 43 } |
| 43 | 44 |
| 44 namespace gfx { | 45 namespace gfx { |
| 45 class Point; | 46 class Point; |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 70 // should be opened in a new tab or window. | 71 // should be opened in a new tab or window. |
| 71 // | 72 // |
| 72 // A NULL source indicates the current tab (callers should probably use | 73 // A NULL source indicates the current tab (callers should probably use |
| 73 // OpenURL() for these cases which does it for you). | 74 // OpenURL() for these cases which does it for you). |
| 74 | 75 |
| 75 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't | 76 // Returns the WebContents the URL is opened in, or NULL if the URL wasn't |
| 76 // opened immediately. | 77 // opened immediately. |
| 77 virtual WebContents* OpenURLFromTab(WebContents* source, | 78 virtual WebContents* OpenURLFromTab(WebContents* source, |
| 78 const OpenURLParams& params); | 79 const OpenURLParams& params); |
| 79 | 80 |
| 81 // Returns false if the navigation in question is to proceed and true if it | |
| 82 // is to be ignored by the renderer. | |
| 83 virtual bool ShouldIgnoreNavigation( | |
| 84 WebContents* source, | |
| 85 const GURL& url, | |
| 86 const content::Referrer& referrer, | |
| 87 WindowOpenDisposition disposition, | |
| 88 bool is_content_intiated, | |
|
Charlie Reis
2012/04/05 17:06:53
nit: initiated
groby-ooo-7-16
2012/04/05 22:51:19
nit: Switch to enum, if possible
mkosiba (inactive)
2012/04/10 17:58:37
Done.
mkosiba (inactive)
2012/04/10 17:58:37
is_content_initiated is already defined as a bool
| |
| 89 content::PageTransition transition_type); | |
| 90 | |
| 80 // Called to inform the delegate that the tab content's navigation state | 91 // Called to inform the delegate that the tab content's navigation state |
| 81 // changed. The |changed_flags| indicates the parts of the navigation state | 92 // changed. The |changed_flags| indicates the parts of the navigation state |
| 82 // that have been updated, and is any combination of the | 93 // that have been updated, and is any combination of the |
| 83 // |WebContents::InvalidateTypes| bits. | 94 // |WebContents::InvalidateTypes| bits. |
| 84 virtual void NavigationStateChanged(const WebContents* source, | 95 virtual void NavigationStateChanged(const WebContents* source, |
| 85 unsigned changed_flags) {} | 96 unsigned changed_flags) {} |
| 86 | 97 |
| 87 // Adds the navigation request headers to |headers|. Use | 98 // Adds the navigation request headers to |headers|. Use |
| 88 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. | 99 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. |
| 89 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} | 100 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 // Called when |this| is no longer the WebContentsDelegate for |source|. | 417 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 407 void Detach(WebContents* source); | 418 void Detach(WebContents* source); |
| 408 | 419 |
| 409 // The WebContents that this is currently a delegate for. | 420 // The WebContents that this is currently a delegate for. |
| 410 std::set<WebContents*> attached_contents_; | 421 std::set<WebContents*> attached_contents_; |
| 411 }; | 422 }; |
| 412 | 423 |
| 413 } // namespace content | 424 } // namespace content |
| 414 | 425 |
| 415 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 426 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |