| 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 OnDocumentLoadedInFrame) | 503 OnDocumentLoadedInFrame) |
| 504 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishLoad, OnDidFinishLoad) | 504 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFinishLoad, OnDidFinishLoad) |
| 505 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenColorChooser, OnOpenColorChooser) | 505 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenColorChooser, OnOpenColorChooser) |
| 506 IPC_MESSAGE_HANDLER(FrameHostMsg_EndColorChooser, OnEndColorChooser) | 506 IPC_MESSAGE_HANDLER(FrameHostMsg_EndColorChooser, OnEndColorChooser) |
| 507 IPC_MESSAGE_HANDLER(FrameHostMsg_SetSelectedColorInColorChooser, | 507 IPC_MESSAGE_HANDLER(FrameHostMsg_SetSelectedColorInColorChooser, |
| 508 OnSetSelectedColorInColorChooser) | 508 OnSetSelectedColorInColorChooser) |
| 509 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPlayingNotification, | 509 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPlayingNotification, |
| 510 OnMediaPlayingNotification) | 510 OnMediaPlayingNotification) |
| 511 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPausedNotification, | 511 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPausedNotification, |
| 512 OnMediaPausedNotification) | 512 OnMediaPausedNotification) |
| 513 IPC_MESSAGE_HANDLER(FrameHostMsg_WidgetVisibleStateChanged, |
| 514 OnWidgetVisibleStateChanged) |
| 513 IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache, | 515 IPC_MESSAGE_HANDLER(ViewHostMsg_DidLoadResourceFromMemoryCache, |
| 514 OnDidLoadResourceFromMemoryCache) | 516 OnDidLoadResourceFromMemoryCache) |
| 515 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent, | 517 IPC_MESSAGE_HANDLER(ViewHostMsg_DidDisplayInsecureContent, |
| 516 OnDidDisplayInsecureContent) | 518 OnDidDisplayInsecureContent) |
| 517 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRunInsecureContent, | 519 IPC_MESSAGE_HANDLER(ViewHostMsg_DidRunInsecureContent, |
| 518 OnDidRunInsecureContent) | 520 OnDidRunInsecureContent) |
| 519 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) | 521 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) |
| 520 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 522 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
| 521 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) | 523 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) |
| 522 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, | 524 IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler, |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 if (delegate_) | 1687 if (delegate_) |
| 1686 delegate_->HideValidationMessage(this); | 1688 delegate_->HideValidationMessage(this); |
| 1687 } | 1689 } |
| 1688 | 1690 |
| 1689 void WebContentsImpl::OnMoveValidationMessage( | 1691 void WebContentsImpl::OnMoveValidationMessage( |
| 1690 const gfx::Rect& anchor_in_root_view) { | 1692 const gfx::Rect& anchor_in_root_view) { |
| 1691 if (delegate_) | 1693 if (delegate_) |
| 1692 delegate_->MoveValidationMessage(this, anchor_in_root_view); | 1694 delegate_->MoveValidationMessage(this, anchor_in_root_view); |
| 1693 } | 1695 } |
| 1694 | 1696 |
| 1697 void WebContentsImpl::OnWidgetVisibleStateChanged( |
| 1698 WidgetVisibleState widget_visible_state) { |
| 1699 if (widget_visible_state == |
| 1700 WIDGET_VISIBLE_STATE_FIRST_VISUALLY_NON_EMPTY_LAYOUT) { |
| 1701 FOR_EACH_OBSERVER( |
| 1702 WebContentsObserver, observers_, DidFirstVisuallyNonEmptyPaint()); |
| 1703 } |
| 1704 } |
| 1705 |
| 1695 void WebContentsImpl::DidSendScreenRects(RenderWidgetHostImpl* rwh) { | 1706 void WebContentsImpl::DidSendScreenRects(RenderWidgetHostImpl* rwh) { |
| 1696 if (browser_plugin_embedder_) | 1707 if (browser_plugin_embedder_) |
| 1697 browser_plugin_embedder_->DidSendScreenRects(); | 1708 browser_plugin_embedder_->DidSendScreenRects(); |
| 1698 } | 1709 } |
| 1699 | 1710 |
| 1700 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { | 1711 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { |
| 1701 const gfx::Size old_size = GetPreferredSize(); | 1712 const gfx::Size old_size = GetPreferredSize(); |
| 1702 preferred_size_ = pref_size; | 1713 preferred_size_ = pref_size; |
| 1703 OnPreferredSizeChanged(old_size); | 1714 OnPreferredSizeChanged(old_size); |
| 1704 } | 1715 } |
| (...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3965 | 3976 |
| 3966 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3977 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3967 if (!delegate_) | 3978 if (!delegate_) |
| 3968 return; | 3979 return; |
| 3969 const gfx::Size new_size = GetPreferredSize(); | 3980 const gfx::Size new_size = GetPreferredSize(); |
| 3970 if (new_size != old_size) | 3981 if (new_size != old_size) |
| 3971 delegate_->UpdatePreferredSize(this, new_size); | 3982 delegate_->UpdatePreferredSize(this, new_size); |
| 3972 } | 3983 } |
| 3973 | 3984 |
| 3974 } // namespace content | 3985 } // namespace content |
| OLD | NEW |