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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 310 | 310 |
| 311 // This method is invoked when the renderer process has completed its first | 311 // This method is invoked when the renderer process has completed its first |
| 312 // paint after a non-empty layout. | 312 // paint after a non-empty layout. |
| 313 virtual void DidFirstVisuallyNonEmptyPaint() {} | 313 virtual void DidFirstVisuallyNonEmptyPaint() {} |
| 314 | 314 |
| 315 // When WebContents::Stop() is called, the WebContents stops loading and then | 315 // When WebContents::Stop() is called, the WebContents stops loading and then |
| 316 // invokes this method. If there are ongoing navigations, their respective | 316 // invokes this method. If there are ongoing navigations, their respective |
| 317 // failure methods will also be invoked. | 317 // failure methods will also be invoked. |
| 318 virtual void NavigationStopped() {} | 318 virtual void NavigationStopped() {} |
| 319 | 319 |
| 320 // This indicates that the next navigation was triggered by a user gesture. | |
| 321 // TODO(dominickn): remove this method in favor of DidGetUserInteraction, | |
| 322 // with the appropriate filtering by input event type. | |
| 323 virtual void DidGetUserGesture() {} | |
| 324 | |
| 325 // Called when there has been direct user interaction with the WebContents. | 320 // Called when there has been direct user interaction with the WebContents. |
| 326 // The type argument specifies the kind of interaction. Direct user input | 321 // The type argument specifies the kind of interaction. Direct user input |
| 327 // signalled through this callback includes: | 322 // signalled through this callback includes: |
| 328 // 1) any mouse down event (blink::WebInputEvent::MouseDown); | 323 // 1) any mouse down event (blink::WebInputEvent::MouseDown); |
| 329 // 2) the start of a mouse wheel scroll (blink::WebInputEvent::MouseWheel); | 324 // 2) the start of a mouse wheel scroll (blink::WebInputEvent::MouseWheel); |
| 330 // 3) any raw key down event (blink::WebInputEvent::RawKeyDown); and | 325 // 3) any raw key down event (blink::WebInputEvent::RawKeyDown); and |
| 331 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown). | 326 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown). |
|
Charlie Reis
2016/02/25 18:28:02
nit: Update the punctuation now that the list is l
dominickn
2016/02/26 00:36:11
Done.
| |
| 327 // 5) a browser navigation or reload (blink::WebInputEvent::Undefined). | |
| 332 // The start of a mouse wheel scroll is heuristically detected: a mouse | 328 // The start of a mouse wheel scroll is heuristically detected: a mouse |
| 333 // wheel event fired at least 0.1 seconds after any other wheel event is | 329 // wheel event fired at least 0.1 seconds after any other wheel event is |
| 334 // regarded as the beginning of a scroll. This matches the interval used by | 330 // regarded as the beginning of a scroll. This matches the interval used by |
| 335 // the Blink EventHandler to detect the end of scrolls. | 331 // the Blink EventHandler to detect the end of scrolls. |
| 336 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} | 332 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} |
| 337 | 333 |
| 338 // This method is invoked when a RenderViewHost of this WebContents was | 334 // This method is invoked when a RenderViewHost of this WebContents was |
| 339 // configured to ignore UI events, and an UI event took place. | 335 // configured to ignore UI events, and an UI event took place. |
| 340 virtual void DidGetIgnoredUIEvent() {} | 336 virtual void DidGetIgnoredUIEvent() {} |
| 341 | 337 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 485 void ResetWebContents(); | 481 void ResetWebContents(); |
| 486 | 482 |
| 487 WebContentsImpl* web_contents_; | 483 WebContentsImpl* web_contents_; |
| 488 | 484 |
| 489 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 485 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 490 }; | 486 }; |
| 491 | 487 |
| 492 } // namespace content | 488 } // namespace content |
| 493 | 489 |
| 494 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 490 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |