Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1657)

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 1735833002: Remove WebContentsObserver::DidGetUserGesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comment Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
331 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown). 326 // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown); and
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.
332 // TODO(dominickn): replace MouseWheel with GestureScrollBegin.
336 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {} 333 virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {}
337 334
338 // This method is invoked when a RenderViewHost of this WebContents was 335 // This method is invoked when a RenderViewHost of this WebContents was
339 // configured to ignore UI events, and an UI event took place. 336 // configured to ignore UI events, and an UI event took place.
340 virtual void DidGetIgnoredUIEvent() {} 337 virtual void DidGetIgnoredUIEvent() {}
341 338
342 // These methods are invoked every time the WebContents changes visibility. 339 // These methods are invoked every time the WebContents changes visibility.
343 virtual void WasShown() {} 340 virtual void WasShown() {}
344 virtual void WasHidden() {} 341 virtual void WasHidden() {}
345 342
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 void ResetWebContents(); 482 void ResetWebContents();
486 483
487 WebContentsImpl* web_contents_; 484 WebContentsImpl* web_contents_;
488 485
489 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 486 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
490 }; 487 };
491 488
492 } // namespace content 489 } // namespace content
493 490
494 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 491 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698