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