OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. | 190 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. |
191 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && | 191 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && |
192 BrowserPluginGuest::IsGuest( | 192 BrowserPluginGuest::IsGuest( |
193 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { | 193 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { |
194 return; | 194 return; |
195 } | 195 } |
196 | 196 |
197 NOTREACHED(); | 197 NOTREACHED(); |
198 } | 198 } |
199 | 199 |
200 void RenderWidgetHostViewChildFrame::TextInputStateChanged( | |
201 const ViewHostMsg_TextInputState_Params& params) { | |
202 // TODO(kenrb): Implement. | |
203 } | |
204 | |
205 void RenderWidgetHostViewChildFrame::RenderProcessGone( | 200 void RenderWidgetHostViewChildFrame::RenderProcessGone( |
206 base::TerminationStatus status, | 201 base::TerminationStatus status, |
207 int error_code) { | 202 int error_code) { |
208 if (frame_connector_) | 203 if (frame_connector_) |
209 frame_connector_->RenderProcessGone(); | 204 frame_connector_->RenderProcessGone(); |
210 Destroy(); | 205 Destroy(); |
211 } | 206 } |
212 | 207 |
213 void RenderWidgetHostViewChildFrame::Destroy() { | 208 void RenderWidgetHostViewChildFrame::Destroy() { |
214 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter | 209 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter |
215 // have already been cleared when RenderWidgetHostViewBase notified its | 210 // have already been cleared when RenderWidgetHostViewBase notified its |
216 // observers of our impending destruction. | 211 // observers of our impending destruction. |
217 if (frame_connector_) { | 212 if (frame_connector_) { |
218 frame_connector_->set_view(NULL); | 213 frame_connector_->set_view(NULL); |
219 frame_connector_ = NULL; | 214 frame_connector_ = NULL; |
220 } | 215 } |
221 | 216 |
222 // We notify our observers about shutdown here since we are about to release | 217 // We notify our observers about shutdown here since we are about to release |
223 // host_ and do not want any event calls coming from | 218 // host_ and do not want any event calls coming from |
224 // RenderWidgetHostInputEventRouter afterwards. | 219 // RenderWidgetHostInputEventRouter afterwards. |
225 NotifyObserversAboutShutdown(); | 220 NotifyObserversAboutShutdown(); |
226 | 221 |
| 222 // If this view has an active text input, the RenderWidgetHostDelegate should |
| 223 // be notified. |
| 224 NotifyHostDelegateAboutShutdown(); |
| 225 |
227 host_->SetView(NULL); | 226 host_->SetView(NULL); |
228 host_ = NULL; | 227 host_ = NULL; |
229 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 228 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
230 } | 229 } |
231 | 230 |
232 void RenderWidgetHostViewChildFrame::SetTooltipText( | 231 void RenderWidgetHostViewChildFrame::SetTooltipText( |
233 const base::string16& tooltip_text) { | 232 const base::string16& tooltip_text) { |
234 } | 233 } |
235 | 234 |
236 void RenderWidgetHostViewChildFrame::SelectionChanged( | 235 void RenderWidgetHostViewChildFrame::SelectionChanged( |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 572 |
574 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 573 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
575 return true; | 574 return true; |
576 } | 575 } |
577 | 576 |
578 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 577 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
579 return surface_id_; | 578 return surface_id_; |
580 }; | 579 }; |
581 | 580 |
582 } // namespace content | 581 } // namespace content |
OLD | NEW |