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 #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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 native_cursor_(NULL), | 123 native_cursor_(NULL), |
124 is_showing_context_menu_(false), | 124 is_showing_context_menu_(false), |
125 visually_deemphasized_(false), | 125 visually_deemphasized_(false), |
126 touch_event_() | 126 touch_event_() |
127 { | 127 { |
128 SetFocusable(true); | 128 SetFocusable(true); |
129 host_->set_view(this); | 129 host_->set_view(this); |
130 } | 130 } |
131 | 131 |
132 RenderWidgetHostViewViews::~RenderWidgetHostViewViews() { | 132 RenderWidgetHostViewViews::~RenderWidgetHostViewViews() { |
133 RenderViewGone(); | 133 RenderViewGone(base::TERMINATION_STATUS_NORMAL_TERMINATION, |
| 134 ResultCodes::NORMAL_EXIT); |
134 } | 135 } |
135 | 136 |
136 void RenderWidgetHostViewViews::InitAsChild() { | 137 void RenderWidgetHostViewViews::InitAsChild() { |
137 Show(); | 138 Show(); |
138 } | 139 } |
139 | 140 |
140 RenderWidgetHost* RenderWidgetHostViewViews::GetRenderWidgetHost() const { | 141 RenderWidgetHost* RenderWidgetHostViewViews::GetRenderWidgetHost() const { |
141 return host_; | 142 return host_; |
142 } | 143 } |
143 | 144 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 if (rect.IsEmpty()) | 279 if (rect.IsEmpty()) |
279 continue; | 280 continue; |
280 | 281 |
281 if (about_to_validate_and_paint_) | 282 if (about_to_validate_and_paint_) |
282 invalid_rect_ = invalid_rect_.Union(rect); | 283 invalid_rect_ = invalid_rect_.Union(rect); |
283 else | 284 else |
284 SchedulePaint(rect, false); | 285 SchedulePaint(rect, false); |
285 } | 286 } |
286 } | 287 } |
287 | 288 |
288 void RenderWidgetHostViewViews::RenderViewGone() { | 289 void RenderWidgetHostViewViews::RenderViewGone(base::TerminationStatus status, |
| 290 int error_code) { |
289 GetRenderWidgetHost()->ViewDestroyed(); | 291 GetRenderWidgetHost()->ViewDestroyed(); |
290 Destroy(); | 292 Destroy(); |
291 } | 293 } |
292 | 294 |
293 void RenderWidgetHostViewViews::Destroy() { | 295 void RenderWidgetHostViewViews::Destroy() { |
294 // TODO(anicolao): deal with any special popup cleanup | 296 // TODO(anicolao): deal with any special popup cleanup |
295 NOTIMPLEMENTED(); | 297 NOTIMPLEMENTED(); |
296 } | 298 } |
297 | 299 |
298 void RenderWidgetHostViewViews::SetTooltipText(const std::wstring& tip) { | 300 void RenderWidgetHostViewViews::SetTooltipText(const std::wstring& tip) { |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 } | 721 } |
720 | 722 |
721 // static | 723 // static |
722 RenderWidgetHostView* | 724 RenderWidgetHostView* |
723 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( | 725 RenderWidgetHostView::GetRenderWidgetHostViewFromNativeView( |
724 gfx::NativeView widget) { | 726 gfx::NativeView widget) { |
725 gpointer user_data = g_object_get_data(G_OBJECT(widget), | 727 gpointer user_data = g_object_get_data(G_OBJECT(widget), |
726 kRenderWidgetHostViewKey); | 728 kRenderWidgetHostViewKey); |
727 return reinterpret_cast<RenderWidgetHostView*>(user_data); | 729 return reinterpret_cast<RenderWidgetHostView*>(user_data); |
728 } | 730 } |
OLD | NEW |