| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. | 212 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. |
| 213 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && | 213 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && |
| 214 BrowserPluginGuest::IsGuest( | 214 BrowserPluginGuest::IsGuest( |
| 215 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { | 215 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { |
| 216 return; | 216 return; |
| 217 } | 217 } |
| 218 | 218 |
| 219 NOTREACHED(); | 219 NOTREACHED(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void RenderWidgetHostViewChildFrame::TextInputStateChanged( |
| 223 const ViewHostMsg_TextInputState_Params& params) { |
| 224 // TODO(kenrb): Implement. |
| 225 } |
| 226 |
| 222 void RenderWidgetHostViewChildFrame::RenderProcessGone( | 227 void RenderWidgetHostViewChildFrame::RenderProcessGone( |
| 223 base::TerminationStatus status, | 228 base::TerminationStatus status, |
| 224 int error_code) { | 229 int error_code) { |
| 225 if (frame_connector_) | 230 if (frame_connector_) |
| 226 frame_connector_->RenderProcessGone(); | 231 frame_connector_->RenderProcessGone(); |
| 227 Destroy(); | 232 Destroy(); |
| 228 } | 233 } |
| 229 | 234 |
| 230 void RenderWidgetHostViewChildFrame::Destroy() { | 235 void RenderWidgetHostViewChildFrame::Destroy() { |
| 231 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter | 236 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter |
| 232 // have already been cleared when RenderWidgetHostViewBase notified its | 237 // have already been cleared when RenderWidgetHostViewBase notified its |
| 233 // observers of our impending destruction. | 238 // observers of our impending destruction. |
| 234 if (frame_connector_) { | 239 if (frame_connector_) { |
| 235 frame_connector_->set_view(NULL); | 240 frame_connector_->set_view(NULL); |
| 236 frame_connector_ = NULL; | 241 frame_connector_ = NULL; |
| 237 } | 242 } |
| 238 | 243 |
| 239 // We notify our observers about shutdown here since we are about to release | 244 // We notify our observers about shutdown here since we are about to release |
| 240 // host_ and do not want any event calls coming from | 245 // host_ and do not want any event calls coming from |
| 241 // RenderWidgetHostInputEventRouter afterwards. | 246 // RenderWidgetHostInputEventRouter afterwards. |
| 242 NotifyObserversAboutShutdown(); | 247 NotifyObserversAboutShutdown(); |
| 243 | 248 |
| 244 // If this view has an active text input, the RenderWidgetHostDelegate should | |
| 245 // be notified. | |
| 246 NotifyHostDelegateAboutShutdown(); | |
| 247 | |
| 248 host_->SetView(NULL); | 249 host_->SetView(NULL); |
| 249 host_ = NULL; | 250 host_ = NULL; |
| 250 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 251 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
| 251 } | 252 } |
| 252 | 253 |
| 253 void RenderWidgetHostViewChildFrame::SetTooltipText( | 254 void RenderWidgetHostViewChildFrame::SetTooltipText( |
| 254 const base::string16& tooltip_text) { | 255 const base::string16& tooltip_text) { |
| 255 } | 256 } |
| 256 | 257 |
| 257 void RenderWidgetHostViewChildFrame::SelectionChanged( | 258 void RenderWidgetHostViewChildFrame::SelectionChanged( |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 | 584 |
| 584 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 585 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 585 return true; | 586 return true; |
| 586 } | 587 } |
| 587 | 588 |
| 588 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 589 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 589 return surface_id_; | 590 return surface_id_; |
| 590 }; | 591 }; |
| 591 | 592 |
| 592 } // namespace content | 593 } // namespace content |
| OLD | NEW |