Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1315723003: Make WebUIImpl a WebContentsObserver to re-use RenderViewCreated() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/webui/web_ui_impl.h » ('j') | content/browser/webui/web_ui_impl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after
3765 return; 3765 return;
3766 3766
3767 if (delegate_) 3767 if (delegate_)
3768 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 3768 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
3769 3769
3770 NotificationService::current()->Notify( 3770 NotificationService::current()->Notify(
3771 NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, 3771 NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED,
3772 Source<WebContents>(this), 3772 Source<WebContents>(this),
3773 Details<RenderViewHost>(render_view_host)); 3773 Details<RenderViewHost>(render_view_host));
3774 3774
3775 // When we're creating views, we're still doing initial setup, so we always
3776 // use the pending Web UI rather than any possibly existing committed one.
3777 if (GetRenderManager()->pending_web_ui())
Charlie Reis 2015/08/28 17:05:56 I'm noticing that this old code only passes on the
3778 GetRenderManager()->pending_web_ui()->RenderViewCreated(render_view_host);
3779
3780 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
3781 switches::kEnableBrowserSideNavigation) &&
3782 GetRenderManager()->speculative_web_ui()) {
3783 GetRenderManager()->speculative_web_ui()->RenderViewCreated(
3784 render_view_host);
3785 }
3786
3787 NavigationEntry* entry = controller_.GetPendingEntry(); 3775 NavigationEntry* entry = controller_.GetPendingEntry();
3788 if (entry && entry->IsViewSourceMode()) { 3776 if (entry && entry->IsViewSourceMode()) {
3789 // Put the renderer in view source mode. 3777 // Put the renderer in view source mode.
3790 render_view_host->Send( 3778 render_view_host->Send(
3791 new ViewMsg_EnableViewSourceMode(render_view_host->GetRoutingID())); 3779 new ViewMsg_EnableViewSourceMode(render_view_host->GetRoutingID()));
3792 } 3780 }
3793 3781
3794 view_->RenderViewCreated(render_view_host); 3782 view_->RenderViewCreated(render_view_host);
3795 3783
3796 FOR_EACH_OBSERVER( 3784 FOR_EACH_OBSERVER(
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
4615 player_map->erase(it); 4603 player_map->erase(it);
4616 } 4604 }
4617 4605
4618 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4606 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4619 force_disable_overscroll_content_ = force_disable; 4607 force_disable_overscroll_content_ = force_disable;
4620 if (view_) 4608 if (view_)
4621 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4609 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4622 } 4610 }
4623 4611
4624 } // namespace content 4612 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/webui/web_ui_impl.h » ('j') | content/browser/webui/web_ui_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698