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

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: Upload after sync for proper diffs 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 406 }
406 407
407 protected: 408 protected:
408 // Internal implementation of the public Forward*Event() methods. 409 // Internal implementation of the public Forward*Event() methods.
409 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, 410 void ForwardInputEvent(const WebKit::WebInputEvent& input_event,
410 int event_size, bool is_keyboard_shortcut); 411 int event_size, bool is_keyboard_shortcut);
411 412
412 // Called when we receive a notification indicating that the renderer 413 // Called when we receive a notification indicating that the renderer
413 // process has gone. This will reset our state so that our state will be 414 // process has gone. This will reset our state so that our state will be
414 // consistent if a new renderer is created. 415 // consistent if a new renderer is created.
415 void RendererExited(); 416 void RendererExited(base::TerminationStatus status, int exit_code);
416 417
417 // Retrieves an id the renderer can use to refer to its view. 418 // Retrieves an id the renderer can use to refer to its view.
418 // This is used for various IPC messages, including plugins. 419 // This is used for various IPC messages, including plugins.
419 gfx::NativeViewId GetNativeViewId(); 420 gfx::NativeViewId GetNativeViewId();
420 421
421 // Called to handled a keyboard event before sending it to the renderer. 422 // Called to handled a keyboard event before sending it to the renderer.
422 // This is overridden by RenderView to send upwards to its delegate. 423 // This is overridden by RenderView to send upwards to its delegate.
423 // Returns true if the event was handled, and then the keyboard event will 424 // Returns true if the event was handled, and then the keyboard event will
424 // not be sent to the renderer anymore. Otherwise, if the |event| would 425 // not be sent to the renderer anymore. Otherwise, if the |event| would
425 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, 426 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // if it is. 466 // if it is.
466 void CheckRendererIsUnresponsive(); 467 void CheckRendererIsUnresponsive();
467 468
468 // Called if we know the renderer is responsive. When we currently think the 469 // Called if we know the renderer is responsive. When we currently think the
469 // renderer is unresponsive, this will clear that state and call 470 // renderer is unresponsive, this will clear that state and call
470 // NotifyRendererResponsive. 471 // NotifyRendererResponsive.
471 void RendererIsResponsive(); 472 void RendererIsResponsive();
472 473
473 // IPC message handlers 474 // IPC message handlers
474 void OnMsgRenderViewReady(); 475 void OnMsgRenderViewReady();
475 void OnMsgRenderViewGone(); 476 void OnMsgRenderViewGone(int status, int error_code);
476 void OnMsgClose(); 477 void OnMsgClose();
477 void OnMsgRequestMove(const gfx::Rect& pos); 478 void OnMsgRequestMove(const gfx::Rect& pos);
478 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); 479 void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size);
479 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); 480 void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
480 void OnMsgInputEventAck(const IPC::Message& message); 481 void OnMsgInputEventAck(const IPC::Message& message);
481 virtual void OnMsgFocus(); 482 virtual void OnMsgFocus();
482 virtual void OnMsgBlur(); 483 virtual void OnMsgBlur();
483 484
484 void OnMsgSetCursor(const WebCursor& cursor); 485 void OnMsgSetCursor(const WebCursor& cursor);
485 void OnMsgImeUpdateTextInputState(WebKit::WebTextInputType type, 486 void OnMsgImeUpdateTextInputState(WebKit::WebTextInputType type,
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // but the Char event generated by alt-2 may also activate a HTML element 681 // but the Char event generated by alt-2 may also activate a HTML element
681 // if its accesskey happens to be "2", then the user may get confused when 682 // if its accesskey happens to be "2", then the user may get confused when
682 // switching back to the original tab, because the content may already be 683 // switching back to the original tab, because the content may already be
683 // changed. 684 // changed.
684 bool suppress_next_char_events_; 685 bool suppress_next_char_events_;
685 686
686 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); 687 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
687 }; 688 };
688 689
689 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 690 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698