| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 virtual void DidNavigateAnyFrame( | 166 virtual void DidNavigateAnyFrame( |
| 167 const LoadCommittedDetails& details, | 167 const LoadCommittedDetails& details, |
| 168 const FrameNavigateParams& params) {} | 168 const FrameNavigateParams& params) {} |
| 169 | 169 |
| 170 // This method is invoked once the window.document object of the main frame | 170 // This method is invoked once the window.document object of the main frame |
| 171 // was created. | 171 // was created. |
| 172 virtual void DocumentAvailableInMainFrame() {} | 172 virtual void DocumentAvailableInMainFrame() {} |
| 173 | 173 |
| 174 // This method is invoked once the onload handler of the main frame has | 174 // This method is invoked once the onload handler of the main frame has |
| 175 // completed. | 175 // completed. |
| 176 virtual void DocumentOnLoadCompletedInMainFrame(int32 page_id) {} | 176 virtual void DocumentOnLoadCompletedInMainFrame() {} |
| 177 | 177 |
| 178 // This method is invoked when the document in the given frame finished | 178 // This method is invoked when the document in the given frame finished |
| 179 // loading. At this point, scripts marked as defer were executed, and | 179 // loading. At this point, scripts marked as defer were executed, and |
| 180 // content scripts marked "document_end" get injected into the frame. | 180 // content scripts marked "document_end" get injected into the frame. |
| 181 virtual void DocumentLoadedInFrame(int64 frame_id, | 181 virtual void DocumentLoadedInFrame(int64 frame_id, |
| 182 RenderViewHost* render_view_host) {} | 182 RenderViewHost* render_view_host) {} |
| 183 | 183 |
| 184 // This method is invoked when the navigation is done, i.e. the spinner of | 184 // This method is invoked when the navigation is done, i.e. the spinner of |
| 185 // the tab will stop spinning, and the onload event was dispatched. | 185 // the tab will stop spinning, and the onload event was dispatched. |
| 186 // | 186 // |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 const Referrer& referrer, | 232 const Referrer& referrer, |
| 233 WindowOpenDisposition disposition, | 233 WindowOpenDisposition disposition, |
| 234 PageTransition transition, | 234 PageTransition transition, |
| 235 int64 source_frame_id) {} | 235 int64 source_frame_id) {} |
| 236 | 236 |
| 237 virtual void FrameDetached(RenderViewHost* render_view_host, | 237 virtual void FrameDetached(RenderViewHost* render_view_host, |
| 238 int64 frame_id) {} | 238 int64 frame_id) {} |
| 239 | 239 |
| 240 // This method is invoked when the renderer has completed its first paint | 240 // This method is invoked when the renderer has completed its first paint |
| 241 // after a non-empty layout. | 241 // after a non-empty layout. |
| 242 virtual void DidFirstVisuallyNonEmptyPaint(int32 page_id) {} | 242 virtual void DidFirstVisuallyNonEmptyPaint() {} |
| 243 | 243 |
| 244 // These two methods correspond to the points in time when the spinner of the | 244 // These two methods correspond to the points in time when the spinner of the |
| 245 // tab starts and stops spinning. | 245 // tab starts and stops spinning. |
| 246 virtual void DidStartLoading(RenderViewHost* render_view_host) {} | 246 virtual void DidStartLoading(RenderViewHost* render_view_host) {} |
| 247 virtual void DidStopLoading(RenderViewHost* render_view_host) {} | 247 virtual void DidStopLoading(RenderViewHost* render_view_host) {} |
| 248 | 248 |
| 249 // When WebContents::Stop() is called, the WebContents stops loading and then | 249 // When WebContents::Stop() is called, the WebContents stops loading and then |
| 250 // invokes this method. If there are ongoing navigations, their respective | 250 // invokes this method. If there are ongoing navigations, their respective |
| 251 // failure methods will also be invoked. | 251 // failure methods will also be invoked. |
| 252 virtual void NavigationStopped() {} | 252 virtual void NavigationStopped() {} |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 294 |
| 295 // Invoked when the WebContents is being destroyed. Gives subclasses a chance | 295 // Invoked when the WebContents is being destroyed. Gives subclasses a chance |
| 296 // to cleanup. At the time this is invoked |web_contents()| returns NULL. | 296 // to cleanup. At the time this is invoked |web_contents()| returns NULL. |
| 297 // It is safe to delete 'this' from here. | 297 // It is safe to delete 'this' from here. |
| 298 virtual void WebContentsDestroyed(WebContents* web_contents) {} | 298 virtual void WebContentsDestroyed(WebContents* web_contents) {} |
| 299 | 299 |
| 300 // Called when the user agent override for a WebContents has been changed. | 300 // Called when the user agent override for a WebContents has been changed. |
| 301 virtual void UserAgentOverrideSet(const std::string& user_agent) {} | 301 virtual void UserAgentOverrideSet(const std::string& user_agent) {} |
| 302 | 302 |
| 303 // Invoked when new FaviconURL candidates are received from the renderer. | 303 // Invoked when new FaviconURL candidates are received from the renderer. |
| 304 virtual void DidUpdateFaviconURL(int32 page_id, | 304 virtual void DidUpdateFaviconURL(const std::vector<FaviconURL>& candidates) {} |
| 305 const std::vector<FaviconURL>& candidates) {} | |
| 306 | 305 |
| 307 // Invoked when a pepper plugin creates and shows or destroys a fullscreen | 306 // Invoked when a pepper plugin creates and shows or destroys a fullscreen |
| 308 // render widget. | 307 // render widget. |
| 309 virtual void DidShowFullscreenWidget(int routing_id) {} | 308 virtual void DidShowFullscreenWidget(int routing_id) {} |
| 310 virtual void DidDestroyFullscreenWidget(int routing_id) {} | 309 virtual void DidDestroyFullscreenWidget(int routing_id) {} |
| 311 | 310 |
| 312 // Invoked when the renderer has toggled the tab into/out of fullscreen mode. | 311 // Invoked when the renderer has toggled the tab into/out of fullscreen mode. |
| 313 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) {} | 312 virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) {} |
| 314 | 313 |
| 315 // Invoked when visible SSL state (as defined by SSLStatus) changes. | 314 // Invoked when visible SSL state (as defined by SSLStatus) changes. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 void WebContentsImplDestroyed(); | 363 void WebContentsImplDestroyed(); |
| 365 | 364 |
| 366 WebContentsImpl* web_contents_; | 365 WebContentsImpl* web_contents_; |
| 367 | 366 |
| 368 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 367 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 369 }; | 368 }; |
| 370 | 369 |
| 371 } // namespace content | 370 } // namespace content |
| 372 | 371 |
| 373 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 372 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |