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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
622 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenColorChooser, OnOpenColorChooser) | 622 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenColorChooser, OnOpenColorChooser) |
623 IPC_MESSAGE_HANDLER(FrameHostMsg_EndColorChooser, OnEndColorChooser) | 623 IPC_MESSAGE_HANDLER(FrameHostMsg_EndColorChooser, OnEndColorChooser) |
624 IPC_MESSAGE_HANDLER(FrameHostMsg_SetSelectedColorInColorChooser, | 624 IPC_MESSAGE_HANDLER(FrameHostMsg_SetSelectedColorInColorChooser, |
625 OnSetSelectedColorInColorChooser) | 625 OnSetSelectedColorInColorChooser) |
626 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPlayingNotification, | 626 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPlayingNotification, |
627 OnMediaPlayingNotification) | 627 OnMediaPlayingNotification) |
628 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPausedNotification, | 628 IPC_MESSAGE_HANDLER(FrameHostMsg_MediaPausedNotification, |
629 OnMediaPausedNotification) | 629 OnMediaPausedNotification) |
630 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstVisuallyNonEmptyPaint, | 630 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstVisuallyNonEmptyPaint, |
631 OnFirstVisuallyNonEmptyPaint) | 631 OnFirstVisuallyNonEmptyPaint) |
632 IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstPaintAfterLoad, | |
633 OnFirstPaintAfterLoad) | |
632 IPC_MESSAGE_HANDLER(FrameHostMsg_DidLoadResourceFromMemoryCache, | 634 IPC_MESSAGE_HANDLER(FrameHostMsg_DidLoadResourceFromMemoryCache, |
633 OnDidLoadResourceFromMemoryCache) | 635 OnDidLoadResourceFromMemoryCache) |
634 IPC_MESSAGE_HANDLER(FrameHostMsg_DidDisplayInsecureContent, | 636 IPC_MESSAGE_HANDLER(FrameHostMsg_DidDisplayInsecureContent, |
635 OnDidDisplayInsecureContent) | 637 OnDidDisplayInsecureContent) |
636 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunInsecureContent, | 638 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunInsecureContent, |
637 OnDidRunInsecureContent) | 639 OnDidRunInsecureContent) |
638 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) | 640 IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) |
639 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) | 641 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateZoomLimits, OnUpdateZoomLimits) |
640 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) | 642 IPC_MESSAGE_HANDLER(ViewHostMsg_EnumerateDirectory, OnEnumerateDirectory) |
641 IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler, | 643 IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler, |
(...skipping 2791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3433 did_first_visually_non_empty_paint_ = true; | 3435 did_first_visually_non_empty_paint_ = true; |
3434 | 3436 |
3435 if (theme_color_ != last_sent_theme_color_) { | 3437 if (theme_color_ != last_sent_theme_color_) { |
3436 // Theme color should have updated by now if there was one. | 3438 // Theme color should have updated by now if there was one. |
3437 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3439 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3438 DidChangeThemeColor(theme_color_)); | 3440 DidChangeThemeColor(theme_color_)); |
3439 last_sent_theme_color_ = theme_color_; | 3441 last_sent_theme_color_ = theme_color_; |
3440 } | 3442 } |
3441 } | 3443 } |
3442 | 3444 |
3445 void WebContentsImpl::OnFirstPaintAfterLoad() { | |
3446 GetMainFrame()->GetRenderWidgetHost()->OnFirstPaintAfterLoad(); | |
Charlie Reis
2015/09/30 20:36:19
Why does this need to come through WebContents? S
kenrb
2015/09/30 21:25:02
Done.
I was copying how the other QueueMessage()
| |
3447 } | |
3448 | |
3443 void WebContentsImpl::DidChangeVisibleSSLState() { | 3449 void WebContentsImpl::DidChangeVisibleSSLState() { |
3444 if (delegate_) { | 3450 if (delegate_) { |
3445 delegate_->VisibleSSLStateChanged(this); | 3451 delegate_->VisibleSSLStateChanged(this); |
3446 | 3452 |
3447 SecurityStyleExplanations security_style_explanations; | 3453 SecurityStyleExplanations security_style_explanations; |
3448 SecurityStyle security_style = | 3454 SecurityStyle security_style = |
3449 delegate_->GetSecurityStyle(this, &security_style_explanations); | 3455 delegate_->GetSecurityStyle(this, &security_style_explanations); |
3450 FOR_EACH_OBSERVER( | 3456 FOR_EACH_OBSERVER( |
3451 WebContentsObserver, observers_, | 3457 WebContentsObserver, observers_, |
3452 SecurityStyleChanged(security_style, security_style_explanations)); | 3458 SecurityStyleChanged(security_style, security_style_explanations)); |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4649 return NULL; | 4655 return NULL; |
4650 } | 4656 } |
4651 | 4657 |
4652 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4658 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4653 force_disable_overscroll_content_ = force_disable; | 4659 force_disable_overscroll_content_ = force_disable; |
4654 if (view_) | 4660 if (view_) |
4655 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4661 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4656 } | 4662 } |
4657 | 4663 |
4658 } // namespace content | 4664 } // namespace content |
OLD | NEW |