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.h" | 8 #include "base/process.h" |
9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 virtual void WasShown() {} | 202 virtual void WasShown() {} |
203 | 203 |
204 virtual void AppCacheAccessed(const GURL& manifest_url, | 204 virtual void AppCacheAccessed(const GURL& manifest_url, |
205 bool blocked_by_policy) {} | 205 bool blocked_by_policy) {} |
206 | 206 |
207 // Notification that a plugin has crashed. | 207 // Notification that a plugin has crashed. |
208 // |plugin_pid| is the process ID identifying the plugin process. Note that | 208 // |plugin_pid| is the process ID identifying the plugin process. Note that |
209 // this ID is supplied by the renderer, so should not be trusted. Besides, the | 209 // this ID is supplied by the renderer, so should not be trusted. Besides, the |
210 // corresponding process has probably died at this point. The ID may even have | 210 // corresponding process has probably died at this point. The ID may even have |
211 // been reused by a new process. | 211 // been reused by a new process. |
212 virtual void PluginCrashed(const FilePath& plugin_path, | 212 virtual void PluginCrashed(const base::FilePath& plugin_path, |
213 base::ProcessId plugin_pid) {} | 213 base::ProcessId plugin_pid) {} |
214 | 214 |
215 // Notication that the given plugin has hung or become unhung. This | 215 // Notication that the given plugin has hung or become unhung. This |
216 // notification is only for Pepper plugins. | 216 // notification is only for Pepper plugins. |
217 // | 217 // |
218 // The plugin_child_id is the unique child process ID from the plugin. Note | 218 // The plugin_child_id is the unique child process ID from the plugin. Note |
219 // that this ID is supplied by the renderer, so should be validated before | 219 // that this ID is supplied by the renderer, so should be validated before |
220 // it's used for anything in case there's an exploited renderer. | 220 // it's used for anything in case there's an exploited renderer. |
221 virtual void PluginHungStatusChanged(int plugin_child_id, | 221 virtual void PluginHungStatusChanged(int plugin_child_id, |
222 const FilePath& plugin_path, | 222 const base::FilePath& plugin_path, |
223 bool is_hung) {} | 223 bool is_hung) {} |
224 | 224 |
225 // Invoked when WebContents::Clone() was used to clone a WebContents. | 225 // Invoked when WebContents::Clone() was used to clone a WebContents. |
226 virtual void DidCloneToNewWebContents(WebContents* old_web_contents, | 226 virtual void DidCloneToNewWebContents(WebContents* old_web_contents, |
227 WebContents* new_web_contents) {} | 227 WebContents* new_web_contents) {} |
228 | 228 |
229 // Invoked when the WebContents is being destroyed. Gives subclasses a chance | 229 // Invoked when the WebContents is being destroyed. Gives subclasses a chance |
230 // to cleanup. At the time this is invoked |web_contents()| returns NULL. | 230 // to cleanup. At the time this is invoked |web_contents()| returns NULL. |
231 // It is safe to delete 'this' from here. | 231 // It is safe to delete 'this' from here. |
232 virtual void WebContentsDestroyed(WebContents* web_contents) {} | 232 virtual void WebContentsDestroyed(WebContents* web_contents) {} |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 void WebContentsImplDestroyed(); | 284 void WebContentsImplDestroyed(); |
285 | 285 |
286 WebContentsImpl* web_contents_; | 286 WebContentsImpl* web_contents_; |
287 | 287 |
288 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 288 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
289 }; | 289 }; |
290 | 290 |
291 } // namespace content | 291 } // namespace content |
292 | 292 |
293 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 293 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |