| 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/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 <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 } | 431 } |
| 432 | 432 |
| 433 Destroy(also_delete); | 433 Destroy(also_delete); |
| 434 } | 434 } |
| 435 | 435 |
| 436 bool RenderWidgetHostImpl::IsLoading() const { | 436 bool RenderWidgetHostImpl::IsLoading() const { |
| 437 return is_loading_; | 437 return is_loading_; |
| 438 } | 438 } |
| 439 | 439 |
| 440 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { | 440 bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { |
| 441 // Only process messages if the RenderWidget is alive. |
| 442 if (!renderer_initialized()) |
| 443 return false; |
| 444 |
| 441 if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg)) | 445 if (owner_delegate_ && owner_delegate_->OnMessageReceived(msg)) |
| 442 return true; | 446 return true; |
| 443 | 447 |
| 444 bool handled = true; | 448 bool handled = true; |
| 445 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg) | 449 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostImpl, msg) |
| 446 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone) | 450 IPC_MESSAGE_HANDLER(FrameHostMsg_RenderProcessGone, OnRenderProcessGone) |
| 447 IPC_MESSAGE_HANDLER(FrameHostMsg_HittestData, OnHittestData) | 451 IPC_MESSAGE_HANDLER(FrameHostMsg_HittestData, OnHittestData) |
| 448 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, | 452 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, |
| 449 OnQueueSyntheticGesture) | 453 OnQueueSyntheticGesture) |
| 450 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, | 454 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, |
| (...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2249 } | 2253 } |
| 2250 | 2254 |
| 2251 #if defined(OS_WIN) | 2255 #if defined(OS_WIN) |
| 2252 gfx::NativeViewAccessible | 2256 gfx::NativeViewAccessible |
| 2253 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2257 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2254 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2258 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2255 } | 2259 } |
| 2256 #endif | 2260 #endif |
| 2257 | 2261 |
| 2258 } // namespace content | 2262 } // namespace content |
| OLD | NEW |