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

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

Issue 1132163004: Remove NOTIFICATION_RENDER_VIEW_HOST_CHANGED. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed explicitly invoking default WebContentsObserver ctor Created 5 years, 7 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
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 3327 matching lines...) Expand 10 before | Expand all | Expand 10 after
3338 3338
3339 void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host, 3339 void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
3340 RenderViewHost* new_host) { 3340 RenderViewHost* new_host) {
3341 // After sending out a swap notification, we need to send a disconnect 3341 // After sending out a swap notification, we need to send a disconnect
3342 // notification so that clients that pick up a pointer to |this| can NULL the 3342 // notification so that clients that pick up a pointer to |this| can NULL the
3343 // pointer. See Bug 1230284. 3343 // pointer. See Bug 1230284.
3344 notify_disconnection_ = true; 3344 notify_disconnection_ = true;
3345 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3345 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3346 RenderViewHostChanged(old_host, new_host)); 3346 RenderViewHostChanged(old_host, new_host));
3347 3347
3348 // TODO(avi): Remove. http://crbug.com/170921
3349 std::pair<RenderViewHost*, RenderViewHost*> details =
3350 std::make_pair(old_host, new_host);
3351 NotificationService::current()->Notify(
3352 NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
3353 Source<WebContents>(this),
3354 Details<std::pair<RenderViewHost*, RenderViewHost*> >(&details));
3355
3356 // Ensure that the associated embedder gets cleared after a RenderViewHost 3348 // Ensure that the associated embedder gets cleared after a RenderViewHost
3357 // gets swapped, so we don't reuse the same embedder next time a 3349 // gets swapped, so we don't reuse the same embedder next time a
3358 // RenderViewHost is attached to this WebContents. 3350 // RenderViewHost is attached to this WebContents.
3359 RemoveBrowserPluginEmbedder(); 3351 RemoveBrowserPluginEmbedder();
3360 } 3352 }
3361 3353
3362 void WebContentsImpl::NotifyFrameSwapped(RenderFrameHost* old_host, 3354 void WebContentsImpl::NotifyFrameSwapped(RenderFrameHost* old_host,
3363 RenderFrameHost* new_host) { 3355 RenderFrameHost* new_host) {
3364 FOR_EACH_OBSERVER(WebContentsObserver, 3356 FOR_EACH_OBSERVER(WebContentsObserver,
3365 observers_, 3357 observers_,
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4429 node->render_manager()->ResumeResponseDeferredAtStart(); 4421 node->render_manager()->ResumeResponseDeferredAtStart();
4430 } 4422 }
4431 4423
4432 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4424 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4433 force_disable_overscroll_content_ = force_disable; 4425 force_disable_overscroll_content_ = force_disable;
4434 if (view_) 4426 if (view_)
4435 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4427 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4436 } 4428 }
4437 4429
4438 } // namespace content 4430 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698