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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "app/surface/transport_dib.h" | 13 #include "app/surface/transport_dib.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/process_util.h" |
15 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
16 #include "base/string16.h" | 17 #include "base/string16.h" |
17 #include "base/timer.h" | 18 #include "base/timer.h" |
18 #include "chrome/common/edit_command.h" | 19 #include "chrome/common/edit_command.h" |
19 #include "chrome/common/native_web_keyboard_event.h" | 20 #include "chrome/common/native_web_keyboard_event.h" |
20 #include "chrome/common/property_bag.h" | 21 #include "chrome/common/property_bag.h" |
21 #include "gfx/native_widget_types.h" | 22 #include "gfx/native_widget_types.h" |
22 #include "gfx/size.h" | 23 #include "gfx/size.h" |
23 #include "ipc/ipc_channel.h" | 24 #include "ipc/ipc_channel.h" |
24 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" | 25 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 // Requests a snapshot of an accessible DOM tree from the renderer. | 407 // Requests a snapshot of an accessible DOM tree from the renderer. |
407 void RequestAccessibilityTree(); | 408 void RequestAccessibilityTree(); |
408 | 409 |
409 // Internal implementation of the public Forward*Event() methods. | 410 // Internal implementation of the public Forward*Event() methods. |
410 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, | 411 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, |
411 int event_size, bool is_keyboard_shortcut); | 412 int event_size, bool is_keyboard_shortcut); |
412 | 413 |
413 // Called when we receive a notification indicating that the renderer | 414 // Called when we receive a notification indicating that the renderer |
414 // process has gone. This will reset our state so that our state will be | 415 // process has gone. This will reset our state so that our state will be |
415 // consistent if a new renderer is created. | 416 // consistent if a new renderer is created. |
416 void RendererExited(); | 417 void RendererExited(base::TerminationStatus status, int exit_code); |
417 | 418 |
418 // Retrieves an id the renderer can use to refer to its view. | 419 // Retrieves an id the renderer can use to refer to its view. |
419 // This is used for various IPC messages, including plugins. | 420 // This is used for various IPC messages, including plugins. |
420 gfx::NativeViewId GetNativeViewId(); | 421 gfx::NativeViewId GetNativeViewId(); |
421 | 422 |
422 // Called to handled a keyboard event before sending it to the renderer. | 423 // Called to handled a keyboard event before sending it to the renderer. |
423 // This is overridden by RenderView to send upwards to its delegate. | 424 // This is overridden by RenderView to send upwards to its delegate. |
424 // Returns true if the event was handled, and then the keyboard event will | 425 // Returns true if the event was handled, and then the keyboard event will |
425 // not be sent to the renderer anymore. Otherwise, if the |event| would | 426 // not be sent to the renderer anymore. Otherwise, if the |event| would |
426 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, | 427 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // if it is. | 467 // if it is. |
467 void CheckRendererIsUnresponsive(); | 468 void CheckRendererIsUnresponsive(); |
468 | 469 |
469 // Called if we know the renderer is responsive. When we currently think the | 470 // Called if we know the renderer is responsive. When we currently think the |
470 // renderer is unresponsive, this will clear that state and call | 471 // renderer is unresponsive, this will clear that state and call |
471 // NotifyRendererResponsive. | 472 // NotifyRendererResponsive. |
472 void RendererIsResponsive(); | 473 void RendererIsResponsive(); |
473 | 474 |
474 // IPC message handlers | 475 // IPC message handlers |
475 void OnMsgRenderViewReady(); | 476 void OnMsgRenderViewReady(); |
476 void OnMsgRenderViewGone(); | 477 void OnMsgRenderViewGone(int status, int error_code); |
477 void OnMsgClose(); | 478 void OnMsgClose(); |
478 void OnMsgRequestMove(const gfx::Rect& pos); | 479 void OnMsgRequestMove(const gfx::Rect& pos); |
479 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); | 480 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); |
480 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); | 481 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); |
481 void OnMsgCreateVideo(const gfx::Size& size); | 482 void OnMsgCreateVideo(const gfx::Size& size); |
482 void OnMsgUpdateVideo(TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect); | 483 void OnMsgUpdateVideo(TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect); |
483 void OnMsgDestroyVideo(); | 484 void OnMsgDestroyVideo(); |
484 void OnMsgInputEventAck(const IPC::Message& message); | 485 void OnMsgInputEventAck(const IPC::Message& message); |
485 virtual void OnMsgFocus(); | 486 virtual void OnMsgFocus(); |
486 virtual void OnMsgBlur(); | 487 virtual void OnMsgBlur(); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 // we don't do it more than once. | 697 // we don't do it more than once. |
697 bool requested_accessibility_tree_; | 698 bool requested_accessibility_tree_; |
698 | 699 |
699 // Optional video YUV layer for used for out-of-process compositing. | 700 // Optional video YUV layer for used for out-of-process compositing. |
700 scoped_ptr<VideoLayer> video_layer_; | 701 scoped_ptr<VideoLayer> video_layer_; |
701 | 702 |
702 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 703 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
703 }; | 704 }; |
704 | 705 |
705 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 706 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
OLD | NEW |