| 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/browser/frame_host/interstitial_page_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 } | 372 } |
| 373 | 373 |
| 374 bool InterstitialPageImpl::OnMessageReceived(RenderViewHost* render_view_host, | 374 bool InterstitialPageImpl::OnMessageReceived(RenderViewHost* render_view_host, |
| 375 const IPC::Message& message) { | 375 const IPC::Message& message) { |
| 376 return OnMessageReceived(message); | 376 return OnMessageReceived(message); |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool InterstitialPageImpl::OnMessageReceived(const IPC::Message& message) { | 379 bool InterstitialPageImpl::OnMessageReceived(const IPC::Message& message) { |
| 380 | 380 |
| 381 bool handled = true; | 381 bool handled = true; |
| 382 bool message_is_ok = true; | 382 IPC_BEGIN_MESSAGE_MAP(InterstitialPageImpl, message) |
| 383 IPC_BEGIN_MESSAGE_MAP_EX(InterstitialPageImpl, message, message_is_ok) | |
| 384 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse, | 383 IPC_MESSAGE_HANDLER(FrameHostMsg_DomOperationResponse, |
| 385 OnDomOperationResponse) | 384 OnDomOperationResponse) |
| 386 IPC_MESSAGE_UNHANDLED(handled = false) | 385 IPC_MESSAGE_UNHANDLED(handled = false) |
| 387 IPC_END_MESSAGE_MAP_EX() | 386 IPC_END_MESSAGE_MAP() |
| 388 | |
| 389 if (!message_is_ok) { | |
| 390 RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD")); | |
| 391 web_contents()->GetRenderProcessHost()->ReceivedBadMessage(); | |
| 392 } | |
| 393 | 387 |
| 394 return handled; | 388 return handled; |
| 395 } | 389 } |
| 396 | 390 |
| 397 void InterstitialPageImpl::RenderFrameCreated( | 391 void InterstitialPageImpl::RenderFrameCreated( |
| 398 RenderFrameHost* render_frame_host) { | 392 RenderFrameHost* render_frame_host) { |
| 399 // Note this is only for subframes in the interstitial, the notification for | 393 // Note this is only for subframes in the interstitial, the notification for |
| 400 // the main frame happens in RenderViewCreated. | 394 // the main frame happens in RenderViewCreated. |
| 401 controller_->delegate()->RenderFrameForInterstitialPageCreated( | 395 controller_->delegate()->RenderFrameForInterstitialPageCreated( |
| 402 render_frame_host); | 396 render_frame_host); |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 | 898 |
| 905 web_contents->GetDelegateView()->TakeFocus(reverse); | 899 web_contents->GetDelegateView()->TakeFocus(reverse); |
| 906 } | 900 } |
| 907 | 901 |
| 908 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 902 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
| 909 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 903 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 910 int active_match_ordinal, bool final_update) { | 904 int active_match_ordinal, bool final_update) { |
| 911 } | 905 } |
| 912 | 906 |
| 913 } // namespace content | 907 } // namespace content |
| OLD | NEW |