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_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 class WebContents; | 34 class WebContents; |
| 35 class WebContentsImpl; | 35 class WebContentsImpl; |
| 36 struct AXEventNotificationDetails; | 36 struct AXEventNotificationDetails; |
| 37 struct AXLocationChangeNotificationDetails; | 37 struct AXLocationChangeNotificationDetails; |
| 38 struct FaviconURL; | 38 struct FaviconURL; |
| 39 struct FrameNavigateParams; | 39 struct FrameNavigateParams; |
| 40 struct LoadCommittedDetails; | 40 struct LoadCommittedDetails; |
| 41 struct Referrer; | 41 struct Referrer; |
| 42 struct ResourceRedirectDetails; | 42 struct ResourceRedirectDetails; |
| 43 struct ResourceRequestDetails; | 43 struct ResourceRequestDetails; |
| 44 struct SecurityStyleExplanations; | |
| 45 | 44 |
| 46 // An observer API implemented by classes which are interested in various page | 45 // An observer API implemented by classes which are interested in various page |
| 47 // load events from WebContents. They also get a chance to filter IPC messages. | 46 // load events from WebContents. They also get a chance to filter IPC messages. |
| 48 // | 47 // |
| 49 // Since a WebContents can be a delegate to almost arbitrarily many | 48 // Since a WebContents can be a delegate to almost arbitrarily many |
| 50 // RenderViewHosts, it is important to check in those WebContentsObserver | 49 // RenderViewHosts, it is important to check in those WebContentsObserver |
| 51 // methods which take a RenderViewHost that the event came from the | 50 // methods which take a RenderViewHost that the event came from the |
| 52 // RenderViewHost the observer cares about. | 51 // RenderViewHost the observer cares about. |
| 53 // | 52 // |
| 54 // Usually, observers should only care about the current RenderViewHost as | 53 // Usually, observers should only care about the current RenderViewHost as |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 const GURL& validated_url) {} | 289 const GURL& validated_url) {} |
| 291 | 290 |
| 292 // This method is like DidFinishLoad, but when the load failed or was | 291 // This method is like DidFinishLoad, but when the load failed or was |
| 293 // cancelled, e.g. window.stop() is invoked. | 292 // cancelled, e.g. window.stop() is invoked. |
| 294 virtual void DidFailLoad(RenderFrameHost* render_frame_host, | 293 virtual void DidFailLoad(RenderFrameHost* render_frame_host, |
| 295 const GURL& validated_url, | 294 const GURL& validated_url, |
| 296 int error_code, | 295 int error_code, |
| 297 const base::string16& error_description, | 296 const base::string16& error_description, |
| 298 bool was_ignored_by_handler) {} | 297 bool was_ignored_by_handler) {} |
| 299 | 298 |
| 300 // This method is invoked when the SecurityStyle of the WebContents changes. | 299 // This method is invoked when the visible security state of the page changes. |
| 301 // |security_style| is the new SecurityStyle. |security_style_explanations| | 300 virtual void DidChangeVisibleSecurityState() {} |
|
clamy
2016/12/09 14:25:44
This method does not seem to be used outside of co
cjgrant
2016/12/09 16:08:29
I've rebased this on top of CL 2556963006, which l
estark
2016/12/09 16:12:44
That's normal for WebContentsObserver methods, see
| |
| 302 // contains human-readable strings explaining why the SecurityStyle of the | |
| 303 // page has been downgraded. | |
| 304 virtual void SecurityStyleChanged( | |
| 305 blink::WebSecurityStyle security_style, | |
| 306 const SecurityStyleExplanations& security_style_explanations) {} | |
| 307 | 301 |
| 308 // This method is invoked when content was loaded from an in-memory cache. | 302 // This method is invoked when content was loaded from an in-memory cache. |
| 309 virtual void DidLoadResourceFromMemoryCache( | 303 virtual void DidLoadResourceFromMemoryCache( |
| 310 const GURL& url, | 304 const GURL& url, |
| 311 const std::string& mime_type, | 305 const std::string& mime_type, |
| 312 ResourceType resource_type) {} | 306 ResourceType resource_type) {} |
| 313 | 307 |
| 314 // This method is invoked when a response has been received for a resource | 308 // This method is invoked when a response has been received for a resource |
| 315 // request. | 309 // request. |
| 316 virtual void DidGetResourceResponseStart( | 310 virtual void DidGetResourceResponseStart( |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 void ResetWebContents(); | 513 void ResetWebContents(); |
| 520 | 514 |
| 521 WebContentsImpl* web_contents_; | 515 WebContentsImpl* web_contents_; |
| 522 | 516 |
| 523 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 517 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 524 }; | 518 }; |
| 525 | 519 |
| 526 } // namespace content | 520 } // namespace content |
| 527 | 521 |
| 528 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 522 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |