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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 18339006: Rename RenderViewGone IPC/methods to better reflect reality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for reviews by creis@ and palmer@. Created 7 years, 5 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
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/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 bool RenderWidgetHostImpl::IsRenderView() const { 436 bool RenderWidgetHostImpl::IsRenderView() const {
437 return false; 437 return false;
438 } 438 }
439 439
440 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { 440 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
441 bool handled = true; 441 bool handled = true;
442 bool msg_is_ok = true; 442 bool msg_is_ok = true;
443 IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHostImpl, msg, msg_is_ok) 443 IPC_BEGIN_MESSAGE_MAP_EX(RenderWidgetHostImpl, msg, msg_is_ok)
444 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady) 444 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewReady, OnRenderViewReady)
445 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderViewGone, OnRenderViewGone) 445 IPC_MESSAGE_HANDLER(ViewHostMsg_RenderProcessGone, OnRenderProcessGone)
446 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) 446 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose)
447 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, 447 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK,
448 OnUpdateScreenRectsAck) 448 OnUpdateScreenRectsAck)
449 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) 449 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove)
450 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) 450 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText)
451 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnPaintAtSizeAck) 451 IPC_MESSAGE_HANDLER(ViewHostMsg_PaintAtSize_ACK, OnPaintAtSizeAck)
452 #if defined(OS_MACOSX) 452 #if defined(OS_MACOSX)
453 IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped, 453 IPC_MESSAGE_HANDLER(ViewHostMsg_CompositorSurfaceBuffersSwapped,
454 OnCompositorSurfaceBuffersSwapped) 454 OnCompositorSurfaceBuffersSwapped)
455 #endif 455 #endif
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 current_size_.SetSize(0, 0); 1537 current_size_.SetSize(0, 0);
1538 is_hidden_ = false; 1538 is_hidden_ = false;
1539 is_accelerated_compositing_active_ = false; 1539 is_accelerated_compositing_active_ = false;
1540 1540
1541 // Reset this to ensure the hung renderer mechanism is working properly. 1541 // Reset this to ensure the hung renderer mechanism is working properly.
1542 in_flight_event_count_ = 0; 1542 in_flight_event_count_ = 0;
1543 1543
1544 if (view_) { 1544 if (view_) {
1545 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_, 1545 GpuSurfaceTracker::Get()->SetSurfaceHandle(surface_id_,
1546 gfx::GLSurfaceHandle()); 1546 gfx::GLSurfaceHandle());
1547 view_->RenderViewGone(status, exit_code); 1547 view_->RenderProcessGone(status, exit_code);
1548 view_ = NULL; // The View should be deleted by RenderViewGone. 1548 view_ = NULL; // The View should be deleted by RenderProcessGone.
1549 } 1549 }
1550 1550
1551 BackingStoreManager::RemoveBackingStore(this); 1551 BackingStoreManager::RemoveBackingStore(this);
1552 } 1552 }
1553 1553
1554 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) { 1554 void RenderWidgetHostImpl::UpdateTextDirection(WebTextDirection direction) {
1555 text_direction_updated_ = true; 1555 text_direction_updated_ = true;
1556 text_direction_ = direction; 1556 text_direction_ = direction;
1557 } 1557 }
1558 1558
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 is_unresponsive_ = false; 1689 is_unresponsive_ = false;
1690 NotifyRendererResponsive(); 1690 NotifyRendererResponsive();
1691 } 1691 }
1692 } 1692 }
1693 1693
1694 void RenderWidgetHostImpl::OnRenderViewReady() { 1694 void RenderWidgetHostImpl::OnRenderViewReady() {
1695 SendScreenRects(); 1695 SendScreenRects();
1696 WasResized(); 1696 WasResized();
1697 } 1697 }
1698 1698
1699 void RenderWidgetHostImpl::OnRenderViewGone(int status, int exit_code) { 1699 void RenderWidgetHostImpl::OnRenderProcessGone(int status, int exit_code) {
1700 // TODO(evanm): This synchronously ends up calling "delete this". 1700 // TODO(evanm): This synchronously ends up calling "delete this".
1701 // Is that really what we want in response to this message? I'm matching 1701 // Is that really what we want in response to this message? I'm matching
1702 // previous behavior of the code here. 1702 // previous behavior of the code here.
1703 Destroy(); 1703 Destroy();
1704 } 1704 }
1705 1705
1706 void RenderWidgetHostImpl::OnClose() { 1706 void RenderWidgetHostImpl::OnClose() {
1707 Shutdown(); 1707 Shutdown();
1708 } 1708 }
1709 1709
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 int process_id = (b->first.second >> 32) & 0xffffffff; 2688 int process_id = (b->first.second >> 32) & 0xffffffff;
2689 RenderWidgetHost* rwh = 2689 RenderWidgetHost* rwh =
2690 RenderWidgetHost::FromID(process_id, routing_id); 2690 RenderWidgetHost::FromID(process_id, routing_id);
2691 if (!rwh) 2691 if (!rwh)
2692 continue; 2692 continue;
2693 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); 2693 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info);
2694 } 2694 }
2695 } 2695 }
2696 2696
2697 } // namespace content 2697 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698