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 20 matching lines...) Expand all Loading... | |
31 class BrowserContext; | 31 class BrowserContext; |
32 class ColorChooser; | 32 class ColorChooser; |
33 class DownloadItem; | 33 class DownloadItem; |
34 class JavaScriptDialogCreator; | 34 class JavaScriptDialogCreator; |
35 class RenderViewHost; | 35 class RenderViewHost; |
36 class WebContents; | 36 class WebContents; |
37 class WebIntentsDispatcher; | 37 class WebIntentsDispatcher; |
38 struct ContextMenuParams; | 38 struct ContextMenuParams; |
39 struct FileChooserParams; | 39 struct FileChooserParams; |
40 struct NativeWebKeyboardEvent; | 40 struct NativeWebKeyboardEvent; |
41 struct Referrer; | |
41 struct SSLStatus; | 42 struct SSLStatus; |
42 } | 43 } |
43 | 44 |
44 namespace gfx { | 45 namespace gfx { |
45 class Point; | 46 class Point; |
46 class Rect; | 47 class Rect; |
47 class Size; | 48 class Size; |
48 } | 49 } |
49 | 50 |
50 namespace history { | 51 namespace history { |
(...skipping 19 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 // Called for top-level navigation to decide whether the navigation should be | |
82 // allowed to proceed. | |
83 virtual bool ShouldIgnoreNavigation( | |
84 WebContents* source, | |
darin (slow to review)
2012/06/01 20:57:41
It seems like this function is no longer necessary
mkosiba (inactive)
2012/06/06 16:11:20
For Chrome on Android it makes sense for the callb
| |
85 const GURL& validated_url, | |
86 const content::Referrer& referrer, | |
87 bool is_content_initiated); | |
88 | |
80 // Called to inform the delegate that the WebContents's navigation state | 89 // Called to inform the delegate that the WebContents's navigation state |
81 // changed. The |changed_flags| indicates the parts of the navigation state | 90 // changed. The |changed_flags| indicates the parts of the navigation state |
82 // that have been updated, and is any combination of the | 91 // that have been updated, and is any combination of the |
83 // |WebContents::InvalidateTypes| bits. | 92 // |WebContents::InvalidateTypes| bits. |
84 virtual void NavigationStateChanged(const WebContents* source, | 93 virtual void NavigationStateChanged(const WebContents* source, |
85 unsigned changed_flags) {} | 94 unsigned changed_flags) {} |
86 | 95 |
87 // Adds the navigation request headers to |headers|. Use | 96 // Adds the navigation request headers to |headers|. Use |
88 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. | 97 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. |
89 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} | 98 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 // Called when |this| is no longer the WebContentsDelegate for |source|. | 418 // Called when |this| is no longer the WebContentsDelegate for |source|. |
410 void Detach(WebContents* source); | 419 void Detach(WebContents* source); |
411 | 420 |
412 // The WebContents that this is currently a delegate for. | 421 // The WebContents that this is currently a delegate for. |
413 std::set<WebContents*> attached_contents_; | 422 std::set<WebContents*> attached_contents_; |
414 }; | 423 }; |
415 | 424 |
416 } // namespace content | 425 } // namespace content |
417 | 426 |
418 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 427 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |