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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 // Called when there has been direct user interaction with the WebContents. | 320 // Called when there has been direct user interaction with the WebContents. |
321 // The type argument specifies the kind of interaction. Direct user input | 321 // The type argument specifies the kind of interaction. Direct user input |
322 // signalled through this callback includes: | 322 // signalled through this callback includes: |
323 // 1) any mouse down event (blink::WebInputEvent::MouseDown); | 323 // 1) any mouse down event (blink::WebInputEvent::MouseDown); |
324 // 2) the start of a mouse wheel scroll (blink::WebInputEvent::MouseWheel); | 324 // 2) the start of a scroll event (blink::WebInputEvent::GestureScrollBegin); |
tdresser
2016/02/29 14:14:12
the start of a scroll event -> the start of a scro
dominickn
2016/02/29 22:52:02
Done.
| |
325 // 3) any raw key down event (blink::WebInputEvent::RawKeyDown); | 325 // 3) any raw key down event (blink::WebInputEvent::RawKeyDown); |
326 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown); and | 326 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown); and |
327 // 5) a browser navigation or reload (blink::WebInputEvent::Undefined). | 327 // 5) a browser navigation or reload (blink::WebInputEvent::Undefined). |
328 // The start of a mouse wheel scroll is heuristically detected: a mouse | |
329 // wheel event fired at least 0.1 seconds after any other wheel event is | |
330 // regarded as the beginning of a scroll. This matches the interval used by | |
331 // the Blink EventHandler to detect the end of scrolls. | |
332 // TODO(dominickn): replace MouseWheel with GestureScrollBegin. | |
333 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} | 328 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} |
334 | 329 |
335 // This method is invoked when a RenderViewHost of this WebContents was | 330 // This method is invoked when a RenderViewHost of this WebContents was |
336 // configured to ignore UI events, and an UI event took place. | 331 // configured to ignore UI events, and an UI event took place. |
337 virtual void DidGetIgnoredUIEvent() {} | 332 virtual void DidGetIgnoredUIEvent() {} |
338 | 333 |
339 // These methods are invoked every time the WebContents changes visibility. | 334 // These methods are invoked every time the WebContents changes visibility. |
340 virtual void WasShown() {} | 335 virtual void WasShown() {} |
341 virtual void WasHidden() {} | 336 virtual void WasHidden() {} |
342 | 337 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
482 void ResetWebContents(); | 477 void ResetWebContents(); |
483 | 478 |
484 WebContentsImpl* web_contents_; | 479 WebContentsImpl* web_contents_; |
485 | 480 |
486 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 481 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
487 }; | 482 }; |
488 | 483 |
489 } // namespace content | 484 } // namespace content |
490 | 485 |
491 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 486 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |