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