Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 1228993005: Be a little more precise in the wording of comments for process death. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // This method is invoked when the RenderView of the current RenderViewHost 90 // This method is invoked when the RenderView of the current RenderViewHost
91 // is ready, e.g. because we recreated it after a crash. 91 // is ready, e.g. because we recreated it after a crash.
92 virtual void RenderViewReady() {} 92 virtual void RenderViewReady() {}
93 93
94 // This method is invoked when a RenderViewHost of the WebContents is 94 // This method is invoked when a RenderViewHost of the WebContents is
95 // deleted. Note that this does not always happen when the WebContents starts 95 // deleted. Note that this does not always happen when the WebContents starts
96 // to use a different RenderViewHost, as the old RenderViewHost might get 96 // to use a different RenderViewHost, as the old RenderViewHost might get
97 // just swapped out. 97 // just swapped out.
98 virtual void RenderViewDeleted(RenderViewHost* render_view_host) {} 98 virtual void RenderViewDeleted(RenderViewHost* render_view_host) {}
99 99
100 // This method is invoked when the process for the current RenderView crashes. 100 // This method is invoked when the process for the current RenderView exits
nasko 2015/07/10 07:48:54 "the process for the current main RenderFrameHost"
Avi (use Gerrit) 2015/07/10 15:29:20 Done.
101 // The WebContents continues to use the RenderViewHost, e.g. when the user 101 // (usually by crashing, though possibly by other means). The WebContents
102 // reloads the current page. When the RenderViewHost itself is deleted, the 102 // continues to use the RenderViewHost, e.g. when the user reloads the current
103 // RenderViewDeleted method will be invoked. 103 // page. When the RenderViewHost itself is deleted, the RenderViewDeleted
104 // method will be invoked.
104 // 105 //
105 // Note that this is equivalent to 106 // Note that this is triggered upstream through
106 // RenderProcessHostObserver::RenderProcessExited(). 107 // RenderProcessHostObserver::RenderProcessExited(); for code that doesn't
108 // otherwise need to be a WebContentsObserver, consider whether that API might
nasko 2015/07/10 07:48:55 I'd word it a bit more strongly. Unless they have
Avi (use Gerrit) 2015/07/10 15:29:20 Done.
109 // be a better choice.
107 virtual void RenderProcessGone(base::TerminationStatus status) {} 110 virtual void RenderProcessGone(base::TerminationStatus status) {}
108 111
109 // This method is invoked when a WebContents swaps its visible RenderViewHost 112 // This method is invoked when a WebContents swaps its visible RenderViewHost
110 // with another one, possibly changing processes. The RenderViewHost that has 113 // with another one, possibly changing processes. The RenderViewHost that has
111 // been replaced is in |old_host|, which is nullptr if the old RVH was shut 114 // been replaced is in |old_host|, which is nullptr if the old RVH was shut
112 // down. 115 // down.
113 virtual void RenderViewHostChanged(RenderViewHost* old_host, 116 virtual void RenderViewHostChanged(RenderViewHost* old_host,
114 RenderViewHost* new_host) {} 117 RenderViewHost* new_host) {}
115 118
116 // This method is invoked after the WebContents decides which RenderFrameHost 119 // This method is invoked after the WebContents decides which RenderFrameHost
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 void ResetWebContents(); 410 void ResetWebContents();
408 411
409 WebContentsImpl* web_contents_; 412 WebContentsImpl* web_contents_;
410 413
411 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 414 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
412 }; 415 };
413 416
414 } // namespace content 417 } // namespace content
415 418
416 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 419 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698