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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 // invokes this method. If there are ongoing navigations, their respective | 312 // invokes this method. If there are ongoing navigations, their respective |
313 // failure methods will also be invoked. | 313 // failure methods will also be invoked. |
314 virtual void NavigationStopped() {} | 314 virtual void NavigationStopped() {} |
315 | 315 |
316 // This indicates that the next navigation was triggered by a user gesture. | 316 // This indicates that the next navigation was triggered by a user gesture. |
317 // TODO(dominickn): remove this method in favor of DidGetUserInteraction, | 317 // TODO(dominickn): remove this method in favor of DidGetUserInteraction, |
318 // with the appropriate filtering by input event type. | 318 // with the appropriate filtering by input event type. |
319 virtual void DidGetUserGesture() {} | 319 virtual void DidGetUserGesture() {} |
320 | 320 |
321 // Called when there has been direct user interaction with the WebContents. | 321 // Called when there has been direct user interaction with the WebContents. |
322 // Direct user input includes 1) any mouse down event; 2) any raw key down | 322 // The type argument specifies the kind of interaction. Direct user input |
323 // event; and 3) any gesture tap event (including taps and scrolls). | 323 // signalled through this callback includes: |
324 // 1) any mouse down event (blink::WebInputEvent::MouseDown); | |
325 // 2) the start of a mouse wheel scroll (blink::WebInputEvent::MouseWheel); | |
nasko
2015/11/03 20:45:59
It isn't really the start, is it? It is the first
dominickn
2015/11/03 21:29:42
Yes. I've updated this comment to match.
| |
326 // 3) any raw key down event (blink::WebInputEvent::RawKeyDown); and | |
327 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown). | |
324 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} | 328 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} |
325 | 329 |
326 // This method is invoked when a RenderViewHost of this WebContents was | 330 // This method is invoked when a RenderViewHost of this WebContents was |
327 // configured to ignore UI events, and an UI event took place. | 331 // configured to ignore UI events, and an UI event took place. |
328 virtual void DidGetIgnoredUIEvent() {} | 332 virtual void DidGetIgnoredUIEvent() {} |
329 | 333 |
330 // These methods are invoked every time the WebContents changes visibility. | 334 // These methods are invoked every time the WebContents changes visibility. |
331 virtual void WasShown() {} | 335 virtual void WasShown() {} |
332 virtual void WasHidden() {} | 336 virtual void WasHidden() {} |
333 | 337 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 void ResetWebContents(); | 467 void ResetWebContents(); |
464 | 468 |
465 WebContentsImpl* web_contents_; | 469 WebContentsImpl* web_contents_; |
466 | 470 |
467 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 471 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
468 }; | 472 }; |
469 | 473 |
470 } // namespace content | 474 } // namespace content |
471 | 475 |
472 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 476 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |