| 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/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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) | 522 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFaviconURL, OnUpdateFaviconURL) |
| 523 #if defined(OS_ANDROID) | 523 #if defined(OS_ANDROID) |
| 524 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply, | 524 IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply, |
| 525 OnFindMatchRectsReply) | 525 OnFindMatchRectsReply) |
| 526 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, | 526 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, |
| 527 OnOpenDateTimeDialog) | 527 OnOpenDateTimeDialog) |
| 528 IPC_MESSAGE_HANDLER_DELAY_REPLY(JavaBridgeHostMsg_GetChannelHandle, | 528 IPC_MESSAGE_HANDLER_DELAY_REPLY(JavaBridgeHostMsg_GetChannelHandle, |
| 529 OnJavaBridgeGetChannelHandle) | 529 OnJavaBridgeGetChannelHandle) |
| 530 #endif | 530 #endif |
| 531 IPC_MESSAGE_HANDLER(ViewHostMsg_MediaNotification, OnMediaNotification) | 531 IPC_MESSAGE_HANDLER(ViewHostMsg_MediaNotification, OnMediaNotification) |
| 532 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstVisuallyNonEmptyPaint, |
| 533 OnFirstVisuallyNonEmptyPaint) |
| 532 IPC_MESSAGE_UNHANDLED(handled = false) | 534 IPC_MESSAGE_UNHANDLED(handled = false) |
| 533 IPC_END_MESSAGE_MAP_EX() | 535 IPC_END_MESSAGE_MAP_EX() |
| 534 message_source_ = NULL; | 536 message_source_ = NULL; |
| 535 | 537 |
| 536 if (!message_is_ok) { | 538 if (!message_is_ok) { |
| 537 RecordAction(UserMetricsAction("BadMessageTerminate_RVD")); | 539 RecordAction(UserMetricsAction("BadMessageTerminate_RVD")); |
| 538 GetRenderProcessHost()->ReceivedBadMessage(); | 540 GetRenderProcessHost()->ReceivedBadMessage(); |
| 539 } | 541 } |
| 540 | 542 |
| 541 return handled; | 543 return handled; |
| (...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2451 | 2453 |
| 2452 if (blocker) | 2454 if (blocker) |
| 2453 power_save_blockers_[message_source_][player_cookie] = blocker.release(); | 2455 power_save_blockers_[message_source_][player_cookie] = blocker.release(); |
| 2454 } else { | 2456 } else { |
| 2455 delete power_save_blockers_[message_source_][player_cookie]; | 2457 delete power_save_blockers_[message_source_][player_cookie]; |
| 2456 power_save_blockers_[message_source_].erase(player_cookie); | 2458 power_save_blockers_[message_source_].erase(player_cookie); |
| 2457 } | 2459 } |
| 2458 #endif // !defined(OS_CHROMEOS) | 2460 #endif // !defined(OS_CHROMEOS) |
| 2459 } | 2461 } |
| 2460 | 2462 |
| 2463 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint(int32 page_id) { |
| 2464 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2465 DidFirstVisuallyNonEmptyPaint(page_id)); |
| 2466 } |
| 2461 | 2467 |
| 2462 void WebContentsImpl::DidChangeVisibleSSLState() { | 2468 void WebContentsImpl::DidChangeVisibleSSLState() { |
| 2463 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2469 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2464 DidChangeVisibleSSLState()); | 2470 DidChangeVisibleSSLState()); |
| 2465 } | 2471 } |
| 2466 | 2472 |
| 2467 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { | 2473 void WebContentsImpl::NotifyBeforeFormRepostWarningShow() { |
| 2468 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2474 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2469 BeforeFormRepostWarningShow()); | 2475 BeforeFormRepostWarningShow()); |
| 2470 } | 2476 } |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3650 } | 3656 } |
| 3651 | 3657 |
| 3652 void WebContentsImpl::OnFrameRemoved( | 3658 void WebContentsImpl::OnFrameRemoved( |
| 3653 RenderViewHostImpl* render_view_host, | 3659 RenderViewHostImpl* render_view_host, |
| 3654 int64 frame_id) { | 3660 int64 frame_id) { |
| 3655 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3661 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 3656 FrameDetached(render_view_host, frame_id)); | 3662 FrameDetached(render_view_host, frame_id)); |
| 3657 } | 3663 } |
| 3658 | 3664 |
| 3659 } // namespace content | 3665 } // namespace content |
| OLD | NEW |