OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/process_util.h" |
12 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
13 #include "chrome/browser/renderer_host/render_widget_host.h" | 14 #include "chrome/browser/renderer_host/render_widget_host.h" |
14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 15 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
15 #include "chrome/common/content_settings_types.h" | 16 #include "chrome/common/content_settings_types.h" |
16 #include "chrome/common/page_zoom.h" | 17 #include "chrome/common/page_zoom.h" |
17 #include "chrome/common/translate_errors.h" | 18 #include "chrome/common/translate_errors.h" |
18 #include "chrome/common/view_types.h" | 19 #include "chrome/common/view_types.h" |
19 #include "chrome/common/window_container_type.h" | 20 #include "chrome/common/window_container_type.h" |
20 #include "net/base/load_states.h" | 21 #include "net/base/load_states.h" |
21 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" | 22 #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 121 |
121 // Set up the RenderView child process. Virtual because it is overridden by | 122 // Set up the RenderView child process. Virtual because it is overridden by |
122 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used | 123 // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used |
123 // as the name of the new top-level frame. | 124 // as the name of the new top-level frame. |
124 virtual bool CreateRenderView(const string16& frame_name); | 125 virtual bool CreateRenderView(const string16& frame_name); |
125 | 126 |
126 // Returns true if the RenderView is active and has not crashed. Virtual | 127 // Returns true if the RenderView is active and has not crashed. Virtual |
127 // because it is overridden by TestRenderViewHost. | 128 // because it is overridden by TestRenderViewHost. |
128 virtual bool IsRenderViewLive() const; | 129 virtual bool IsRenderViewLive() const; |
129 | 130 |
| 131 base::TerminationStatus render_view_termination_status() const { |
| 132 return render_view_termination_status_; |
| 133 } |
| 134 |
130 // Send the renderer process the current preferences supplied by the | 135 // Send the renderer process the current preferences supplied by the |
131 // RenderViewHostDelegate. | 136 // RenderViewHostDelegate. |
132 void SyncRendererPrefs(); | 137 void SyncRendererPrefs(); |
133 | 138 |
134 // Sends the given navigation message. Use this rather than sending it | 139 // Sends the given navigation message. Use this rather than sending it |
135 // yourself since this does the internal bookkeeping described below. This | 140 // yourself since this does the internal bookkeeping described below. This |
136 // function takes ownership of the provided message pointer. | 141 // function takes ownership of the provided message pointer. |
137 // | 142 // |
138 // If a cross-site request is in progress, we may be suspended while waiting | 143 // If a cross-site request is in progress, we may be suspended while waiting |
139 // for the onbeforeunload handler, so this function might buffer the message | 144 // for the onbeforeunload handler, so this function might buffer the message |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 548 |
544 // IPC message handlers. | 549 // IPC message handlers. |
545 void OnMsgShowView(int route_id, | 550 void OnMsgShowView(int route_id, |
546 WindowOpenDisposition disposition, | 551 WindowOpenDisposition disposition, |
547 const gfx::Rect& initial_pos, | 552 const gfx::Rect& initial_pos, |
548 bool user_gesture); | 553 bool user_gesture); |
549 void OnMsgShowWidget(int route_id, const gfx::Rect& initial_pos); | 554 void OnMsgShowWidget(int route_id, const gfx::Rect& initial_pos); |
550 void OnMsgShowFullscreenWidget(int route_id); | 555 void OnMsgShowFullscreenWidget(int route_id); |
551 void OnMsgRunModal(IPC::Message* reply_msg); | 556 void OnMsgRunModal(IPC::Message* reply_msg); |
552 void OnMsgRenderViewReady(); | 557 void OnMsgRenderViewReady(); |
553 void OnMsgRenderViewGone(); | 558 void OnMsgRenderViewGone(int status, int error_code); |
554 void OnMsgNavigate(const IPC::Message& msg); | 559 void OnMsgNavigate(const IPC::Message& msg); |
555 void OnMsgUpdateState(int32 page_id, | 560 void OnMsgUpdateState(int32 page_id, |
556 const std::string& state); | 561 const std::string& state); |
557 void OnMsgUpdateTitle(int32 page_id, const std::wstring& title); | 562 void OnMsgUpdateTitle(int32 page_id, const std::wstring& title); |
558 void OnMsgUpdateEncoding(const std::string& encoding); | 563 void OnMsgUpdateEncoding(const std::string& encoding); |
559 void OnMsgUpdateTargetURL(int32 page_id, const GURL& url); | 564 void OnMsgUpdateTargetURL(int32 page_id, const GURL& url); |
560 void OnMsgThumbnail(const GURL& url, | 565 void OnMsgThumbnail(const GURL& url, |
561 const ThumbnailScore& score, | 566 const ThumbnailScore& score, |
562 const SkBitmap& bitmap); | 567 const SkBitmap& bitmap); |
563 void OnMsgScreenshot(const SkBitmap& bitmap); | 568 void OnMsgScreenshot(const SkBitmap& bitmap); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 std::vector<string16> autofill_icons_; | 817 std::vector<string16> autofill_icons_; |
813 std::vector<int> autofill_unique_ids_; | 818 std::vector<int> autofill_unique_ids_; |
814 int autofill_query_id_; | 819 int autofill_query_id_; |
815 | 820 |
816 // Whether the accessibility tree should be saved, for unit testing. | 821 // Whether the accessibility tree should be saved, for unit testing. |
817 bool save_accessibility_tree_for_testing_; | 822 bool save_accessibility_tree_for_testing_; |
818 | 823 |
819 // The most recently received accessibility tree - for unit testing only. | 824 // The most recently received accessibility tree - for unit testing only. |
820 webkit_glue::WebAccessibility accessibility_tree_; | 825 webkit_glue::WebAccessibility accessibility_tree_; |
821 | 826 |
| 827 // The termination status of the last render view that terminated. |
| 828 base::TerminationStatus render_view_termination_status_; |
| 829 |
822 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 830 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
823 }; | 831 }; |
824 | 832 |
825 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 833 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |