| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, | 44 class CONTENT_EXPORT WebContentsObserver : public IPC::Listener, |
| 45 public IPC::Sender { | 45 public IPC::Sender { |
| 46 public: | 46 public: |
| 47 // Only one of the two methods below will be called when a RVH is created for | 47 // Only one of the two methods below will be called when a RVH is created for |
| 48 // a WebContents, depending on whether it's for an interstitial or not. | 48 // a WebContents, depending on whether it's for an interstitial or not. |
| 49 virtual void RenderViewCreated(RenderViewHost* render_view_host) {} | 49 virtual void RenderViewCreated(RenderViewHost* render_view_host) {} |
| 50 virtual void RenderViewForInterstitialPageCreated( | 50 virtual void RenderViewForInterstitialPageCreated( |
| 51 RenderViewHost* render_view_host) {} | 51 RenderViewHost* render_view_host) {} |
| 52 | 52 |
| 53 // This method is invoked when the RenderView of the current RenderViewHost | 53 // This method is invoked when the RenderView of the current RenderViewHost |
| 54 // is ready, e.g. because we recreated it after a crash. | 54 // is "ready" because it has connected to a renderer process. |
| 55 virtual void RenderViewReady() {} | 55 virtual void RenderViewReady() {} |
| 56 | 56 |
| 57 // This method is invoked when a RenderViewHost of the WebContents is | 57 // This method is invoked when a RenderViewHost of the WebContents is |
| 58 // deleted. Note that this does not always happen when the WebContents starts | 58 // deleted. Note that this does not always happen when the WebContents starts |
| 59 // to use a different RenderViewHost, as the old RenderViewHost might get | 59 // to use a different RenderViewHost, as the old RenderViewHost might get |
| 60 // just swapped out. | 60 // just swapped out. |
| 61 virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} | 61 virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} |
| 62 | 62 |
| 63 // This method is invoked when the process for the current RenderView crashes. | 63 // This method is invoked when the process for the current RenderView crashes. |
| 64 // The WebContents continues to use the RenderViewHost, e.g. when the user | 64 // The WebContents continues to use the RenderViewHost, e.g. when the user |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 void WebContentsImplDestroyed(); | 338 void WebContentsImplDestroyed(); |
| 339 | 339 |
| 340 WebContentsImpl* web_contents_; | 340 WebContentsImpl* web_contents_; |
| 341 | 341 |
| 342 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 342 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 343 }; | 343 }; |
| 344 | 344 |
| 345 } // namespace content | 345 } // namespace content |
| 346 | 346 |
| 347 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 347 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |