OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 void RendererIsResponsive(); | 473 void RendererIsResponsive(); |
474 | 474 |
475 // IPC message handlers | 475 // IPC message handlers |
476 void OnMsgRenderViewReady(); | 476 void OnMsgRenderViewReady(); |
477 void OnMsgRenderViewGone(); | 477 void OnMsgRenderViewGone(); |
478 void OnMsgClose(); | 478 void OnMsgClose(); |
479 void OnMsgRequestMove(const gfx::Rect& pos); | 479 void OnMsgRequestMove(const gfx::Rect& pos); |
480 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); | 480 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); |
481 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 481 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
482 void OnMsgCreateVideo(const gfx::Size& size); | 482 void OnMsgCreateVideo(const gfx::Size& size); |
483 void OnMsgUpdateVideo(TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect); | 483 void OnMsgUpdateVideo(TransportDIB::Id dib_id, |
| 484 TransportDIB::Handle dib_handle, |
| 485 const gfx::Rect& bitmap_rect); |
484 void OnMsgDestroyVideo(); | 486 void OnMsgDestroyVideo(); |
485 void OnMsgInputEventAck(const IPC::Message& message); | 487 void OnMsgInputEventAck(const IPC::Message& message); |
486 virtual void OnMsgFocus(); | 488 virtual void OnMsgFocus(); |
487 virtual void OnMsgBlur(); | 489 virtual void OnMsgBlur(); |
488 | 490 |
489 void OnMsgSetCursor(const WebCursor& cursor); | 491 void OnMsgSetCursor(const WebCursor& cursor); |
490 void OnMsgImeUpdateTextInputState(WebKit::WebTextInputType type, | 492 void OnMsgImeUpdateTextInputState(WebKit::WebTextInputType type, |
491 const gfx::Rect& caret_rect); | 493 const gfx::Rect& caret_rect); |
492 void OnMsgImeCancelComposition(); | 494 void OnMsgImeCancelComposition(); |
493 | 495 |
(...skipping 22 matching lines...) Expand all Loading... |
516 #elif defined(OS_POSIX) | 518 #elif defined(OS_POSIX) |
517 void OnMsgCreatePluginContainer(gfx::PluginWindowHandle id); | 519 void OnMsgCreatePluginContainer(gfx::PluginWindowHandle id); |
518 void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id); | 520 void OnMsgDestroyPluginContainer(gfx::PluginWindowHandle id); |
519 #endif | 521 #endif |
520 | 522 |
521 // Paints the given bitmap to the current backing store at the given location. | 523 // Paints the given bitmap to the current backing store at the given location. |
522 // |*painted_synchronously| will be true if the message was processed | 524 // |*painted_synchronously| will be true if the message was processed |
523 // synchronously, and the bitmap is done being used. False means that the | 525 // synchronously, and the bitmap is done being used. False means that the |
524 // backing store will paint the bitmap at a later time and that the DIB can't | 526 // backing store will paint the bitmap at a later time and that the DIB can't |
525 // be freed (it will be the backing store's job to free it later). | 527 // be freed (it will be the backing store's job to free it later). |
526 void PaintBackingStoreRect(TransportDIB::Id bitmap, | 528 void PaintBackingStoreRect(TransportDIB::Id dib_id, |
| 529 TransportDIB::Handle dib_handle, |
527 const gfx::Rect& bitmap_rect, | 530 const gfx::Rect& bitmap_rect, |
528 const std::vector<gfx::Rect>& copy_rects, | 531 const std::vector<gfx::Rect>& copy_rects, |
529 const gfx::Size& view_size, | 532 const gfx::Size& view_size, |
530 bool* painted_synchronously); | 533 bool* painted_synchronously); |
531 | 534 |
532 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The | 535 // Scrolls the given |clip_rect| in the backing by the given dx/dy amount. The |
533 // |dib| and its corresponding location |bitmap_rect| in the backing store | 536 // |dib| and its corresponding location |bitmap_rect| in the backing store |
534 // is the newly painted pixels by the renderer. | 537 // is the newly painted pixels by the renderer. |
535 void ScrollBackingStoreRect(int dx, int dy, const gfx::Rect& clip_rect, | 538 void ScrollBackingStoreRect(int dx, int dy, const gfx::Rect& clip_rect, |
536 const gfx::Size& view_size); | 539 const gfx::Size& view_size); |
537 | 540 |
538 // Paints the entire given bitmap into the current video layer, if it exists. | 541 // Paints the entire given bitmap into the current video layer, if it exists. |
539 // |bitmap_rect| specifies the destination size and absolute location of the | 542 // |bitmap_rect| specifies the destination size and absolute location of the |
540 // bitmap on the backing store. | 543 // bitmap on the backing store. |
541 void PaintVideoLayer(TransportDIB::Id bitmap, | 544 void PaintVideoLayer(TransportDIB::Id dib_id, |
| 545 TransportDIB::Handle dib_handle, |
542 const gfx::Rect& bitmap_rect); | 546 const gfx::Rect& bitmap_rect); |
543 | 547 |
544 // Called by OnMsgInputEventAck() to process a keyboard event ack message. | 548 // Called by OnMsgInputEventAck() to process a keyboard event ack message. |
545 void ProcessKeyboardEventAck(int type, bool processed); | 549 void ProcessKeyboardEventAck(int type, bool processed); |
546 | 550 |
547 // Called by OnMsgInputEventAck() to process a wheel event ack message. | 551 // Called by OnMsgInputEventAck() to process a wheel event ack message. |
548 // This could result in a task being posted to allow additional wheel | 552 // This could result in a task being posted to allow additional wheel |
549 // input messages to be coalesced. | 553 // input messages to be coalesced. |
550 void ProcessWheelAck(); | 554 void ProcessWheelAck(); |
551 | 555 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // changed. | 694 // changed. |
691 bool suppress_next_char_events_; | 695 bool suppress_next_char_events_; |
692 | 696 |
693 // Optional video YUV layer for used for out-of-process compositing. | 697 // Optional video YUV layer for used for out-of-process compositing. |
694 scoped_ptr<VideoLayer> video_layer_; | 698 scoped_ptr<VideoLayer> video_layer_; |
695 | 699 |
696 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 700 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
697 }; | 701 }; |
698 | 702 |
699 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 703 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
OLD | NEW |