Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.h

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final review changes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/rect.h" 23 #include "gfx/rect.h"
23 #include "gfx/size.h" 24 #include "gfx/size.h"
24 #include "ipc/ipc_channel.h" 25 #include "ipc/ipc_channel.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 void ActivateDeferredPluginHandles(); 409 void ActivateDeferredPluginHandles();
409 410
410 protected: 411 protected:
411 // Internal implementation of the public Forward*Event() methods. 412 // Internal implementation of the public Forward*Event() methods.
412 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, 413 void ForwardInputEvent(const WebKit::WebInputEvent& input_event,
413 int event_size, bool is_keyboard_shortcut); 414 int event_size, bool is_keyboard_shortcut);
414 415
415 // Called when we receive a notification indicating that the renderer 416 // Called when we receive a notification indicating that the renderer
416 // process has gone. This will reset our state so that our state will be 417 // process has gone. This will reset our state so that our state will be
417 // consistent if a new renderer is created. 418 // consistent if a new renderer is created.
418 void RendererExited(); 419 void RendererExited(base::TerminationStatus status, int exit_code);
419 420
420 // Retrieves an id the renderer can use to refer to its view. 421 // Retrieves an id the renderer can use to refer to its view.
421 // This is used for various IPC messages, including plugins. 422 // This is used for various IPC messages, including plugins.
422 gfx::NativeViewId GetNativeViewId(); 423 gfx::NativeViewId GetNativeViewId();
423 424
424 // Called to handled a keyboard event before sending it to the renderer. 425 // Called to handled a keyboard event before sending it to the renderer.
425 // This is overridden by RenderView to send upwards to its delegate. 426 // This is overridden by RenderView to send upwards to its delegate.
426 // Returns true if the event was handled, and then the keyboard event will 427 // Returns true if the event was handled, and then the keyboard event will
427 // not be sent to the renderer anymore. Otherwise, if the |event| would 428 // not be sent to the renderer anymore. Otherwise, if the |event| would
428 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, 429 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // if it is. 469 // if it is.
469 void CheckRendererIsUnresponsive(); 470 void CheckRendererIsUnresponsive();
470 471
471 // Called if we know the renderer is responsive. When we currently think the 472 // Called if we know the renderer is responsive. When we currently think the
472 // renderer is unresponsive, this will clear that state and call 473 // renderer is unresponsive, this will clear that state and call
473 // NotifyRendererResponsive. 474 // NotifyRendererResponsive.
474 void RendererIsResponsive(); 475 void RendererIsResponsive();
475 476
476 // IPC message handlers 477 // IPC message handlers
477 void OnMsgRenderViewReady(); 478 void OnMsgRenderViewReady();
478 void OnMsgRenderViewGone(); 479 void OnMsgRenderViewGone(int status, int error_code);
479 void OnMsgClose(); 480 void OnMsgClose();
480 void OnMsgRequestMove(const gfx::Rect& pos); 481 void OnMsgRequestMove(const gfx::Rect& pos);
481 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); 482 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size);
482 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); 483 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
483 void OnMsgInputEventAck(const IPC::Message& message); 484 void OnMsgInputEventAck(const IPC::Message& message);
484 virtual void OnMsgFocus(); 485 virtual void OnMsgFocus();
485 virtual void OnMsgBlur(); 486 virtual void OnMsgBlur();
486 487
487 void OnMsgSetCursor(const WebCursor& cursor); 488 void OnMsgSetCursor(const WebCursor& cursor);
488 void OnMsgImeUpdateTextInputState(WebKit::WebTextInputType type, 489 void OnMsgImeUpdateTextInputState(WebKit::WebTextInputType type,
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 // switching back to the original tab, because the content may already be 686 // switching back to the original tab, because the content may already be
686 // changed. 687 // changed.
687 bool suppress_next_char_events_; 688 bool suppress_next_char_events_;
688 689
689 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; 690 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_;
690 691
691 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 692 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
692 }; 693 };
693 694
694 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 695 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_delegate.h ('k') | chrome/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698