| 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 "base/process/kill.h" | 8 #include "base/process/kill.h" |
| 9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 virtual void RenderViewReady() {} | 65 virtual void RenderViewReady() {} |
| 66 | 66 |
| 67 // This method is invoked when a RenderViewHost of the WebContents is | 67 // This method is invoked when a RenderViewHost of the WebContents is |
| 68 // deleted. Note that this does not always happen when the WebContents starts | 68 // deleted. Note that this does not always happen when the WebContents starts |
| 69 // to use a different RenderViewHost, as the old RenderViewHost might get | 69 // to use a different RenderViewHost, as the old RenderViewHost might get |
| 70 // just swapped out. | 70 // just swapped out. |
| 71 virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} | 71 virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} |
| 72 | 72 |
| 73 // This method is invoked when the process for the current RenderView crashes. | 73 // This method is invoked when the process for the current RenderView crashes. |
| 74 // The WebContents continues to use the RenderViewHost, e.g. when the user | 74 // The WebContents continues to use the RenderViewHost, e.g. when the user |
| 75 // reloads the current page. | 75 // reloads the current page. When the RenderViewHost itself is deleted, the |
| 76 // When the RenderViewHost is deleted, the RenderViewDeleted method will be | 76 // RenderViewDeleted method will be invoked. |
| 77 // invoked. | 77 // |
| 78 // Note that this is equivalent to |
| 79 // RenderProcessHostObserver::RenderProcessExited(). |
| 78 virtual void RenderProcessGone(base::TerminationStatus status) {} | 80 virtual void RenderProcessGone(base::TerminationStatus status) {} |
| 79 | 81 |
| 80 // This method is invoked when a WebContents swaps its render view host with | 82 // This method is invoked when a WebContents swaps its render view host with |
| 81 // another one, possibly changing processes. The RenderViewHost that has | 83 // another one, possibly changing processes. The RenderViewHost that has |
| 82 // been replaced is in |old_render_view_host|, which is NULL if the old RVH | 84 // been replaced is in |old_render_view_host|, which is NULL if the old RVH |
| 83 // was shut down. | 85 // was shut down. |
| 84 virtual void RenderViewHostChanged(RenderViewHost* old_host, | 86 virtual void RenderViewHostChanged(RenderViewHost* old_host, |
| 85 RenderViewHost* new_host) {} | 87 RenderViewHost* new_host) {} |
| 86 | 88 |
| 87 // This method is invoked after the WebContents decided which RenderViewHost | 89 // This method is invoked after the WebContents decided which RenderViewHost |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 void WebContentsImplDestroyed(); | 355 void WebContentsImplDestroyed(); |
| 354 | 356 |
| 355 WebContentsImpl* web_contents_; | 357 WebContentsImpl* web_contents_; |
| 356 | 358 |
| 357 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 359 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 358 }; | 360 }; |
| 359 | 361 |
| 360 } // namespace content | 362 } // namespace content |
| 361 | 363 |
| 362 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 364 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |