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 "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" |
| 11 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
| 12 #include "content/public/common/frame_navigate_params.h" | 12 #include "content/public/common/frame_navigate_params.h" |
| 13 #include "content/public/common/security_style.h" | 13 #include "content/public/common/security_style.h" |
| 14 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
| 15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
| 16 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
| 16 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
| 17 #include "ui/base/page_transition_types.h" | 18 #include "ui/base/page_transition_types.h" |
| 18 #include "ui/base/window_open_disposition.h" | 19 #include "ui/base/window_open_disposition.h" |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 | 22 |
| 22 class NavigationEntry; | 23 class NavigationEntry; |
| 23 class NavigationHandle; | 24 class NavigationHandle; |
| 24 class RenderFrameHost; | 25 class RenderFrameHost; |
| 25 class RenderViewHost; | 26 class RenderViewHost; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 306 // This method is invoked when the renderer process has completed its first | 307 // This method is invoked when the renderer process has completed its first |
| 307 // paint after a non-empty layout. | 308 // paint after a non-empty layout. |
| 308 virtual void DidFirstVisuallyNonEmptyPaint() {} | 309 virtual void DidFirstVisuallyNonEmptyPaint() {} |
| 309 | 310 |
| 310 // When WebContents::Stop() is called, the WebContents stops loading and then | 311 // When WebContents::Stop() is called, the WebContents stops loading and then |
| 311 // invokes this method. If there are ongoing navigations, their respective | 312 // invokes this method. If there are ongoing navigations, their respective |
| 312 // failure methods will also be invoked. | 313 // failure methods will also be invoked. |
| 313 virtual void NavigationStopped() {} | 314 virtual void NavigationStopped() {} |
| 314 | 315 |
| 315 // 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 DidStartUserInteraction, | |
| 318 // with the appropriate filtering by input event type. | |
| 316 virtual void DidGetUserGesture() {} | 319 virtual void DidGetUserGesture() {} |
| 317 | 320 |
| 321 // Called when there has been direct user interaction with the web contents. | |
| 322 // Direct user input includes 1) any mouse down event; 2) any mouse wheel | |
| 323 // event; 3) any raw key down event; and 4) any gesture tap event. | |
| 324 virtual void DidStartUserInteraction(const blink::WebInputEvent::Type type) {} | |
|
nasko
2015/10/26 17:18:44
Any method that has a Start in its name should hav
dominickn
2015/10/27 07:03:57
The naming was a reviewer suggestion. I've changed
| |
| 325 | |
| 318 // This method is invoked when a RenderViewHost of this WebContents was | 326 // This method is invoked when a RenderViewHost of this WebContents was |
| 319 // configured to ignore UI events, and an UI event took place. | 327 // configured to ignore UI events, and an UI event took place. |
| 320 virtual void DidGetIgnoredUIEvent() {} | 328 virtual void DidGetIgnoredUIEvent() {} |
| 321 | 329 |
| 322 // These methods are invoked every time the WebContents changes visibility. | 330 // These methods are invoked every time the WebContents changes visibility. |
| 323 virtual void WasShown() {} | 331 virtual void WasShown() {} |
| 324 virtual void WasHidden() {} | 332 virtual void WasHidden() {} |
| 325 | 333 |
| 326 // Invoked when the main frame changes size. | 334 // Invoked when the main frame changes size. |
| 327 virtual void MainFrameWasResized(bool width_changed) {} | 335 virtual void MainFrameWasResized(bool width_changed) {} |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 455 void ResetWebContents(); | 463 void ResetWebContents(); |
| 456 | 464 |
| 457 WebContentsImpl* web_contents_; | 465 WebContentsImpl* web_contents_; |
| 458 | 466 |
| 459 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 467 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 460 }; | 468 }; |
| 461 | 469 |
| 462 } // namespace content | 470 } // namespace content |
| 463 | 471 |
| 464 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 472 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |