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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

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: Created 10 years, 1 month 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) 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 #include "chrome/browser/renderer_host/render_widget_host_view_views.h" 5 #include "chrome/browser/renderer_host/render_widget_host_view_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "app/keyboard_code_conversion_gtk.h" 10 #include "app/keyboard_code_conversion_gtk.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 about_to_validate_and_paint_(false), 62 about_to_validate_and_paint_(false),
63 is_hidden_(false), 63 is_hidden_(false),
64 is_loading_(false), 64 is_loading_(false),
65 is_showing_context_menu_(false), 65 is_showing_context_menu_(false),
66 visually_deemphasized_(false) { 66 visually_deemphasized_(false) {
67 SetFocusable(true); 67 SetFocusable(true);
68 host_->set_view(this); 68 host_->set_view(this);
69 } 69 }
70 70
71 RenderWidgetHostViewViews::~RenderWidgetHostViewViews() { 71 RenderWidgetHostViewViews::~RenderWidgetHostViewViews() {
72 RenderViewGone(); 72 RenderViewGone(base::TERMINATION_STATUS_NORMAL_TERMINATION, 0);
73 } 73 }
74 74
75 void RenderWidgetHostViewViews::InitAsChild() { 75 void RenderWidgetHostViewViews::InitAsChild() {
76 Show(); 76 Show();
77 } 77 }
78 78
79 RenderWidgetHost* RenderWidgetHostViewViews::GetRenderWidgetHost() const { 79 RenderWidgetHost* RenderWidgetHostViewViews::GetRenderWidgetHost() const {
80 return host_; 80 return host_;
81 } 81 }
82 82
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (rect.IsEmpty()) 217 if (rect.IsEmpty())
218 continue; 218 continue;
219 219
220 if (about_to_validate_and_paint_) 220 if (about_to_validate_and_paint_)
221 invalid_rect_ = invalid_rect_.Union(rect); 221 invalid_rect_ = invalid_rect_.Union(rect);
222 else 222 else
223 SchedulePaint(rect, false); 223 SchedulePaint(rect, false);
224 } 224 }
225 } 225 }
226 226
227 void RenderWidgetHostViewViews::RenderViewGone() { 227 void RenderWidgetHostViewViews::RenderViewGone(base::TerminationStatus status,
228 int error_code) {
228 GetRenderWidgetHost()->ViewDestroyed(); 229 GetRenderWidgetHost()->ViewDestroyed();
229 Destroy(); 230 Destroy();
230 } 231 }
231 232
232 void RenderWidgetHostViewViews::Destroy() { 233 void RenderWidgetHostViewViews::Destroy() {
233 // TODO(anicolao): deal with any special popup cleanup 234 // TODO(anicolao): deal with any special popup cleanup
234 NOTIMPLEMENTED(); 235 NOTIMPLEMENTED();
235 } 236 }
236 237
237 void RenderWidgetHostViewViews::SetTooltipText(const std::wstring& tip) { 238 void RenderWidgetHostViewViews::SetTooltipText(const std::wstring& tip) {
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 } 560 }
560 561
561 // static 562 // static
562 RenderWidgetHostView* 563 RenderWidgetHostView*
563 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( 564 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView(
564 gfx::NativeView widget) { 565 gfx::NativeView widget) {
565 gpointer user_data = g_object_get_data(G_OBJECT(widget), 566 gpointer user_data = g_object_get_data(G_OBJECT(widget),
566 kRenderWidgetHostViewKey); 567 kRenderWidgetHostViewKey);
567 return reinterpret_cast<RenderWidgetHostView*>(user_data); 568 return reinterpret_cast<RenderWidgetHostView*>(user_data);
568 } 569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698