| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" | 
| 6 | 6 | 
| 7 #include <map> | 7 #include <map> | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" | 
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 384       return true; | 384       return true; | 
| 385   } | 385   } | 
| 386 | 386 | 
| 387   bool handled = true; | 387   bool handled = true; | 
| 388   bool msg_is_ok = true; | 388   bool msg_is_ok = true; | 
| 389   IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameImpl, msg, msg_is_ok) | 389   IPC_BEGIN_MESSAGE_MAP_EX(RenderFrameImpl, msg, msg_is_ok) | 
| 390     IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) | 390     IPC_MESSAGE_HANDLER(FrameMsg_SwapOut, OnSwapOut) | 
| 391     IPC_MESSAGE_HANDLER(FrameMsg_BuffersSwapped, OnBuffersSwapped) | 391     IPC_MESSAGE_HANDLER(FrameMsg_BuffersSwapped, OnBuffersSwapped) | 
| 392     IPC_MESSAGE_HANDLER_GENERIC(FrameMsg_CompositorFrameSwapped, | 392     IPC_MESSAGE_HANDLER_GENERIC(FrameMsg_CompositorFrameSwapped, | 
| 393                                 OnCompositorFrameSwapped(msg)) | 393                                 OnCompositorFrameSwapped(msg)) | 
|  | 394     IPC_MESSAGE_HANDLER(FrameMsg_ChildFrameProcessGone, OnChildFrameProcessGone) | 
| 394   IPC_END_MESSAGE_MAP_EX() | 395   IPC_END_MESSAGE_MAP_EX() | 
| 395 | 396 | 
| 396   if (!msg_is_ok) { | 397   if (!msg_is_ok) { | 
| 397     // The message had a handler, but its deserialization failed. | 398     // The message had a handler, but its deserialization failed. | 
| 398     // Kill the renderer to avoid potential spoofing attacks. | 399     // Kill the renderer to avoid potential spoofing attacks. | 
| 399     CHECK(false) << "Unable to deserialize message in RenderFrameImpl."; | 400     CHECK(false) << "Unable to deserialize message in RenderFrameImpl."; | 
| 400   } | 401   } | 
| 401 | 402 | 
| 402   return handled; | 403   return handled; | 
| 403  } | 404  } | 
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 530 #endif | 531 #endif | 
| 531 } | 532 } | 
| 532 | 533 | 
| 533 void RenderFrameImpl::LoadURLExternally( | 534 void RenderFrameImpl::LoadURLExternally( | 
| 534     blink::WebFrame* frame, | 535     blink::WebFrame* frame, | 
| 535     const blink::WebURLRequest& request, | 536     const blink::WebURLRequest& request, | 
| 536     blink::WebNavigationPolicy policy) { | 537     blink::WebNavigationPolicy policy) { | 
| 537   loadURLExternally(frame, request, policy); | 538   loadURLExternally(frame, request, policy); | 
| 538 } | 539 } | 
| 539 | 540 | 
|  | 541 void RenderFrameImpl::OnChildFrameProcessGone() { | 
|  | 542   if (compositing_helper_) | 
|  | 543     compositing_helper_->ChildFrameGone(); | 
|  | 544 } | 
|  | 545 | 
| 540 // blink::WebFrameClient implementation ---------------------------------------- | 546 // blink::WebFrameClient implementation ---------------------------------------- | 
| 541 | 547 | 
| 542 blink::WebPlugin* RenderFrameImpl::createPlugin( | 548 blink::WebPlugin* RenderFrameImpl::createPlugin( | 
| 543     blink::WebFrame* frame, | 549     blink::WebFrame* frame, | 
| 544     const blink::WebPluginParams& params) { | 550     const blink::WebPluginParams& params) { | 
| 545   blink::WebPlugin* plugin = NULL; | 551   blink::WebPlugin* plugin = NULL; | 
| 546   if (GetContentClient()->renderer()->OverrideCreatePlugin( | 552   if (GetContentClient()->renderer()->OverrideCreatePlugin( | 
| 547           this, frame, params, &plugin)) { | 553           this, frame, params, &plugin)) { | 
| 548     return plugin; | 554     return plugin; | 
| 549   } | 555   } | 
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1496 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { | 1502 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { | 
| 1497   observers_.AddObserver(observer); | 1503   observers_.AddObserver(observer); | 
| 1498 } | 1504 } | 
| 1499 | 1505 | 
| 1500 void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { | 1506 void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { | 
| 1501   observer->RenderFrameGone(); | 1507   observer->RenderFrameGone(); | 
| 1502   observers_.RemoveObserver(observer); | 1508   observers_.RemoveObserver(observer); | 
| 1503 } | 1509 } | 
| 1504 | 1510 | 
| 1505 }  // namespace content | 1511 }  // namespace content | 
| OLD | NEW | 
|---|