Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 | 316 |
| 317 // This method is invoked when a new non-pending navigation entry is created. | 317 // This method is invoked when a new non-pending navigation entry is created. |
| 318 // This corresponds to one NavigationController entry being created | 318 // This corresponds to one NavigationController entry being created |
| 319 // (in the case of new navigations) or renavigated to (for back/forward | 319 // (in the case of new navigations) or renavigated to (for back/forward |
| 320 // navigations). | 320 // navigations). |
| 321 virtual void NavigationEntryCommitted( | 321 virtual void NavigationEntryCommitted( |
| 322 const LoadCommittedDetails& load_details) {} | 322 const LoadCommittedDetails& load_details) {} |
| 323 | 323 |
| 324 // This method is invoked when a new WebContents was created in response to | 324 // This method is invoked when a new WebContents was created in response to |
| 325 // an action in the observed WebContents, e.g. a link with target=_blank was | 325 // an action in the observed WebContents, e.g. a link with target=_blank was |
| 326 // clicked. The |source_render_frame_host| is the frame in which the action | 326 // clicked. The |source_render_frame_host| is the frame in which the action |
|
Charlie Reis
2017/02/02 23:34:22
Please also mention "Open in new tab" from a conte
| |
| 327 // took place. | 327 // took place. |
| 328 virtual void DidOpenRequestedURL(WebContents* new_contents, | 328 virtual void DidOpenRequestedURL(WebContents* new_contents, |
| 329 RenderFrameHost* source_render_frame_host, | 329 RenderFrameHost* source_render_frame_host, |
| 330 const GURL& url, | 330 const GURL& url, |
| 331 const Referrer& referrer, | 331 const Referrer& referrer, |
| 332 WindowOpenDisposition disposition, | 332 WindowOpenDisposition disposition, |
| 333 ui::PageTransition transition) {} | 333 ui::PageTransition transition, |
| 334 bool started_from_context_meu) {} | |
|
Charlie Reis
2017/02/02 23:34:22
nit: started_from_context_menu
| |
| 334 | 335 |
| 335 // This method is invoked when the renderer process has completed its first | 336 // This method is invoked when the renderer process has completed its first |
| 336 // paint after a non-empty layout. | 337 // paint after a non-empty layout. |
| 337 virtual void DidFirstVisuallyNonEmptyPaint() {} | 338 virtual void DidFirstVisuallyNonEmptyPaint() {} |
| 338 | 339 |
| 339 // This method is invoked when the main frame in the renderer process performs | 340 // This method is invoked when the main frame in the renderer process performs |
| 340 // the first paint after a navigation. | 341 // the first paint after a navigation. |
| 341 virtual void DidFirstPaintAfterLoad(RenderWidgetHost* render_widget_host) {} | 342 virtual void DidFirstPaintAfterLoad(RenderWidgetHost* render_widget_host) {} |
| 342 | 343 |
| 343 // When WebContents::Stop() is called, the WebContents stops loading and then | 344 // When WebContents::Stop() is called, the WebContents stops loading and then |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 511 void ResetWebContents(); | 512 void ResetWebContents(); |
| 512 | 513 |
| 513 WebContentsImpl* web_contents_; | 514 WebContentsImpl* web_contents_; |
| 514 | 515 |
| 515 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 516 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 516 }; | 517 }; |
| 517 | 518 |
| 518 } // namespace content | 519 } // namespace content |
| 519 | 520 |
| 520 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 521 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |