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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 | 306 |
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. |
jdduke (slow)
2015/10/21 20:53:52
Perhaps a TODO Here to remove this in favor of the
dominickn
2015/10/26 04:14:24
Done.
| |
316 virtual void DidGetUserGesture() {} | 317 virtual void DidGetUserGesture() {} |
317 | 318 |
319 // Called when there has been direct user interaction with the web contents. | |
320 // Direct user input includes 1) any mouse down event; 2) any mouse wheel | |
321 // event; 3) any raw key down event; and 4) any gesture tap event. | |
322 virtual void DidGetUserInput(const blink::WebInputEvent::Type type) {} | |
jdduke (slow)
2015/10/21 20:53:51
Let's call this |DidStartUserInteraction|, to make
dominickn
2015/10/26 04:14:24
Done.
| |
323 | |
318 // This method is invoked when a RenderViewHost of this WebContents was | 324 // This method is invoked when a RenderViewHost of this WebContents was |
319 // configured to ignore UI events, and an UI event took place. | 325 // configured to ignore UI events, and an UI event took place. |
320 virtual void DidGetIgnoredUIEvent() {} | 326 virtual void DidGetIgnoredUIEvent() {} |
321 | 327 |
322 // These methods are invoked every time the WebContents changes visibility. | 328 // These methods are invoked every time the WebContents changes visibility. |
323 virtual void WasShown() {} | 329 virtual void WasShown() {} |
324 virtual void WasHidden() {} | 330 virtual void WasHidden() {} |
325 | 331 |
326 // Invoked when the main frame changes size. | 332 // Invoked when the main frame changes size. |
327 virtual void MainFrameWasResized(bool width_changed) {} | 333 virtual void MainFrameWasResized(bool width_changed) {} |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 void ResetWebContents(); | 461 void ResetWebContents(); |
456 | 462 |
457 WebContentsImpl* web_contents_; | 463 WebContentsImpl* web_contents_; |
458 | 464 |
459 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 465 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
460 }; | 466 }; |
461 | 467 |
462 } // namespace content | 468 } // namespace content |
463 | 469 |
464 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 470 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |