Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10014013: Add a hang monitor for Pepper plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory) 569 IPC_MESSAGE_HANDLER(ViewHostMsg_JSOutOfMemory, OnJSOutOfMemory)
570 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, 570 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler,
571 OnRegisterProtocolHandler) 571 OnRegisterProtocolHandler)
572 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply) 572 IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
573 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin) 573 IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
574 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed) 574 IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
575 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser) 575 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser)
576 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser) 576 IPC_MESSAGE_HANDLER(ViewHostMsg_EndColorChooser, OnEndColorChooser)
577 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser, 577 IPC_MESSAGE_HANDLER(ViewHostMsg_SetSelectedColorInColorChooser,
578 OnSetSelectedColorInColorChooser) 578 OnSetSelectedColorInColorChooser)
579 IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung)
579 IPC_MESSAGE_UNHANDLED(handled = false) 580 IPC_MESSAGE_UNHANDLED(handled = false)
580 IPC_END_MESSAGE_MAP_EX() 581 IPC_END_MESSAGE_MAP_EX()
581 582
582 if (!message_is_ok) { 583 if (!message_is_ok) {
583 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVD")); 584 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVD"));
584 GetRenderProcessHost()->ReceivedBadMessage(); 585 GetRenderProcessHost()->ReceivedBadMessage();
585 } 586 }
586 587
587 return handled; 588 return handled;
588 } 589 }
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 color_chooser_->End(); 1765 color_chooser_->End();
1765 } 1766 }
1766 1767
1767 void WebContentsImpl::OnSetSelectedColorInColorChooser(int color_chooser_id, 1768 void WebContentsImpl::OnSetSelectedColorInColorChooser(int color_chooser_id,
1768 const SkColor& color) { 1769 const SkColor& color) {
1769 if (color_chooser_ && 1770 if (color_chooser_ &&
1770 color_chooser_id == color_chooser_->identifier()) 1771 color_chooser_id == color_chooser_->identifier())
1771 color_chooser_->SetSelectedColor(color); 1772 color_chooser_->SetSelectedColor(color);
1772 } 1773 }
1773 1774
1775 void TabContents::OnPepperPluginHung(int plugin_child_id,
1776 const FilePath& path,
1777 bool is_hung) {
1778 if (delegate_)
1779 delegate_->PluginHungStatusChanged(this, plugin_child_id, path, is_hung);
1780 }
1781
1774 // Notifies the RenderWidgetHost instance about the fact that the page is 1782 // Notifies the RenderWidgetHost instance about the fact that the page is
1775 // loading, or done loading and calls the base implementation. 1783 // loading, or done loading and calls the base implementation.
1776 void WebContentsImpl::SetIsLoading(bool is_loading, 1784 void WebContentsImpl::SetIsLoading(bool is_loading,
1777 LoadNotificationDetails* details) { 1785 LoadNotificationDetails* details) {
1778 if (is_loading == is_loading_) 1786 if (is_loading == is_loading_)
1779 return; 1787 return;
1780 1788
1781 if (!is_loading) { 1789 if (!is_loading) {
1782 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16()); 1790 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, string16());
1783 load_state_host_.clear(); 1791 load_state_host_.clear();
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2615 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2623 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2616 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2624 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2617 // Can be NULL during tests. 2625 // Can be NULL during tests.
2618 if (rwh_view) 2626 if (rwh_view)
2619 rwh_view->SetSize(GetView()->GetContainerSize()); 2627 rwh_view->SetSize(GetView()->GetContainerSize());
2620 } 2628 }
2621 2629
2622 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { 2630 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() {
2623 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); 2631 return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
2624 } 2632 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698