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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 // Invoked when the renderer process changes the page scale factor. | 416 // Invoked when the renderer process changes the page scale factor. |
417 virtual void OnPageScaleFactorChanged(float page_scale_factor) {} | 417 virtual void OnPageScaleFactorChanged(float page_scale_factor) {} |
418 | 418 |
419 // Invoked if an IPC message is coming from a specific RenderFrameHost. | 419 // Invoked if an IPC message is coming from a specific RenderFrameHost. |
420 virtual bool OnMessageReceived(const IPC::Message& message, | 420 virtual bool OnMessageReceived(const IPC::Message& message, |
421 RenderFrameHost* render_frame_host); | 421 RenderFrameHost* render_frame_host); |
422 | 422 |
423 // Notification that |contents| has gained focus. | 423 // Notification that |contents| has gained focus. |
424 virtual void OnWebContentsFocused() {} | 424 virtual void OnWebContentsFocused() {} |
425 | 425 |
| 426 // Notifes that a CompositorFrame was received from the renderer. |
| 427 virtual void DidReceiveCompositorFrame() {} |
| 428 |
426 // IPC::Listener implementation. | 429 // IPC::Listener implementation. |
427 bool OnMessageReceived(const IPC::Message& message) override; | 430 bool OnMessageReceived(const IPC::Message& message) override; |
428 | 431 |
429 // IPC::Sender implementation. | 432 // IPC::Sender implementation. |
430 bool Send(IPC::Message* message) override; | 433 bool Send(IPC::Message* message) override; |
431 int routing_id() const; | 434 int routing_id() const; |
432 | 435 |
433 WebContents* web_contents() const; | 436 WebContents* web_contents() const; |
434 | 437 |
435 protected: | 438 protected: |
(...skipping 17 matching lines...) Expand all Loading... |
453 void ResetWebContents(); | 456 void ResetWebContents(); |
454 | 457 |
455 WebContentsImpl* web_contents_; | 458 WebContentsImpl* web_contents_; |
456 | 459 |
457 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 460 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
458 }; | 461 }; |
459 | 462 |
460 } // namespace content | 463 } // namespace content |
461 | 464 |
462 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 465 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |