| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 | 1162 |
| 1163 crashed_status_ = status; | 1163 crashed_status_ = status; |
| 1164 crashed_error_code_ = error_code; | 1164 crashed_error_code_ = error_code; |
| 1165 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); | 1165 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { | 1168 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { |
| 1169 return crashed_status_; | 1169 return crashed_status_; |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 int WebContentsImpl::GetCrashedErrorCode() const { |
| 1173 return crashed_error_code_; |
| 1174 } |
| 1175 |
| 1172 bool WebContentsImpl::IsBeingDestroyed() const { | 1176 bool WebContentsImpl::IsBeingDestroyed() const { |
| 1173 return is_being_destroyed_; | 1177 return is_being_destroyed_; |
| 1174 } | 1178 } |
| 1175 | 1179 |
| 1176 void WebContentsImpl::NotifyNavigationStateChanged( | 1180 void WebContentsImpl::NotifyNavigationStateChanged( |
| 1177 InvalidateTypes changed_flags) { | 1181 InvalidateTypes changed_flags) { |
| 1178 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 | 1182 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 |
| 1179 // is fixed. | 1183 // is fixed. |
| 1180 tracked_objects::ScopedTracker tracking_profile( | 1184 tracked_objects::ScopedTracker tracking_profile( |
| 1181 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1185 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| (...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4339 DidGetUserInteraction(type)); | 4343 DidGetUserInteraction(type)); |
| 4340 } | 4344 } |
| 4341 | 4345 |
| 4342 void WebContentsImpl::OnIgnoredUIEvent() { | 4346 void WebContentsImpl::OnIgnoredUIEvent() { |
| 4343 // Notify observers. | 4347 // Notify observers. |
| 4344 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4348 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
| 4345 } | 4349 } |
| 4346 | 4350 |
| 4347 void WebContentsImpl::RendererUnresponsive( | 4351 void WebContentsImpl::RendererUnresponsive( |
| 4348 RenderWidgetHostImpl* render_widget_host) { | 4352 RenderWidgetHostImpl* render_widget_host) { |
| 4353 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 4354 OnRendererUnresponsive(render_widget_host)); |
| 4355 |
| 4349 // Don't show hung renderer dialog for a swapped out RVH. | 4356 // Don't show hung renderer dialog for a swapped out RVH. |
| 4350 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 4357 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
| 4351 return; | 4358 return; |
| 4352 | 4359 |
| 4353 RenderFrameHostImpl* rfhi = | 4360 RenderFrameHostImpl* rfhi = |
| 4354 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); | 4361 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); |
| 4355 | 4362 |
| 4356 // Ignore renderer unresponsive event if debugger is attached to the tab | 4363 // Ignore renderer unresponsive event if debugger is attached to the tab |
| 4357 // since the event may be a result of the renderer sitting on a breakpoint. | 4364 // since the event may be a result of the renderer sitting on a breakpoint. |
| 4358 // See http://crbug.com/65458 | 4365 // See http://crbug.com/65458 |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4751 const WebContentsObserver::MediaPlayerId& id) { | 4758 const WebContentsObserver::MediaPlayerId& id) { |
| 4752 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4759 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4753 } | 4760 } |
| 4754 | 4761 |
| 4755 void WebContentsImpl::MediaStoppedPlaying( | 4762 void WebContentsImpl::MediaStoppedPlaying( |
| 4756 const WebContentsObserver::MediaPlayerId& id) { | 4763 const WebContentsObserver::MediaPlayerId& id) { |
| 4757 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4764 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4758 } | 4765 } |
| 4759 | 4766 |
| 4760 } // namespace content | 4767 } // namespace content |
| OLD | NEW |