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_util.h" | 9 #include "base/process_util.h" |
9 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
10 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
11 #include "content/public/common/page_transition_types.h" | 12 #include "content/public/common/page_transition_types.h" |
12 #include "content/public/common/three_d_api_types.h" | 13 #include "content/public/common/three_d_api_types.h" |
13 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
14 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
15 #include "webkit/glue/window_open_disposition.h" | 16 #include "webkit/glue/window_open_disposition.h" |
16 | 17 |
17 namespace content { | 18 namespace content { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 WindowOpenDisposition disposition, | 103 WindowOpenDisposition disposition, |
103 PageTransition transition, | 104 PageTransition transition, |
104 int64 source_frame_id) {} | 105 int64 source_frame_id) {} |
105 | 106 |
106 virtual void WasShown() {} | 107 virtual void WasShown() {} |
107 | 108 |
108 virtual void AppCacheAccessed(const GURL& manifest_url, | 109 virtual void AppCacheAccessed(const GURL& manifest_url, |
109 bool blocked_by_policy) {} | 110 bool blocked_by_policy) {} |
110 | 111 |
111 // Notification that a plugin has crashed. | 112 // Notification that a plugin has crashed. |
112 virtual void PluginCrashed(const FilePath& plugin_path) {} | 113 // |plugin_pid| is the process ID identifying the plugin process. Note that |
| 114 // this ID is supplied by the renderer, so should not be trusted. Besides, the |
| 115 // corresponding process has probably died at this point. The ID may even have |
| 116 // been reused by a new process. |
| 117 virtual void PluginCrashed(const FilePath& plugin_path, |
| 118 base::ProcessId plugin_pid) {} |
113 | 119 |
114 // Notication that the given plugin has hung or become unhung. This | 120 // Notication that the given plugin has hung or become unhung. This |
115 // notification is only for Pepper plugins. | 121 // notification is only for Pepper plugins. |
116 // | 122 // |
117 // The plugin_child_id is the unique child process ID from the plugin. Note | 123 // The plugin_child_id is the unique child process ID from the plugin. Note |
118 // that this ID is supplied by the renderer, so should be validated before | 124 // that this ID is supplied by the renderer, so should be validated before |
119 // it's used for anything in case there's an exploited renderer. | 125 // it's used for anything in case there's an exploited renderer. |
120 virtual void PluginHungStatusChanged(int plugin_child_id, | 126 virtual void PluginHungStatusChanged(int plugin_child_id, |
121 const FilePath& plugin_path, | 127 const FilePath& plugin_path, |
122 bool is_hung) {} | 128 bool is_hung) {} |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void WebContentsImplDestroyed(); | 181 void WebContentsImplDestroyed(); |
176 | 182 |
177 WebContentsImpl* web_contents_; | 183 WebContentsImpl* web_contents_; |
178 | 184 |
179 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 185 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
180 }; | 186 }; |
181 | 187 |
182 } // namespace content | 188 } // namespace content |
183 | 189 |
184 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 190 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |