| 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 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2803 } | 2803 } |
| 2804 | 2804 |
| 2805 view_->RenderViewCreated(render_view_host); | 2805 view_->RenderViewCreated(render_view_host); |
| 2806 | 2806 |
| 2807 FOR_EACH_OBSERVER( | 2807 FOR_EACH_OBSERVER( |
| 2808 WebContentsObserver, observers_, RenderViewCreated(render_view_host)); | 2808 WebContentsObserver, observers_, RenderViewCreated(render_view_host)); |
| 2809 | 2809 |
| 2810 // We tell the observers now instead of when the main RenderFrameHostImpl is | 2810 // We tell the observers now instead of when the main RenderFrameHostImpl is |
| 2811 // constructed because otherwise it would be too early (i.e. IPCs sent to the | 2811 // constructed because otherwise it would be too early (i.e. IPCs sent to the |
| 2812 // frame would be dropped because it's not created yet). | 2812 // frame would be dropped because it's not created yet). |
| 2813 RenderFrameHost* main_frame = GetMainFrame(); | 2813 RenderFrameHost* main_frame = render_view_host->GetMainFrame(); |
| 2814 FOR_EACH_OBSERVER( | 2814 FOR_EACH_OBSERVER( |
| 2815 WebContentsObserver, observers_, RenderFrameCreated(main_frame)); | 2815 WebContentsObserver, observers_, RenderFrameCreated(main_frame)); |
| 2816 } | 2816 } |
| 2817 | 2817 |
| 2818 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { | 2818 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { |
| 2819 if (rvh != GetRenderViewHost()) { | 2819 if (rvh != GetRenderViewHost()) { |
| 2820 // Don't notify the world, since this came from a renderer in the | 2820 // Don't notify the world, since this came from a renderer in the |
| 2821 // background. | 2821 // background. |
| 2822 return; | 2822 return; |
| 2823 } | 2823 } |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 | 3662 |
| 3663 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3663 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3664 if (!delegate_) | 3664 if (!delegate_) |
| 3665 return; | 3665 return; |
| 3666 const gfx::Size new_size = GetPreferredSize(); | 3666 const gfx::Size new_size = GetPreferredSize(); |
| 3667 if (new_size != old_size) | 3667 if (new_size != old_size) |
| 3668 delegate_->UpdatePreferredSize(this, new_size); | 3668 delegate_->UpdatePreferredSize(this, new_size); |
| 3669 } | 3669 } |
| 3670 | 3670 |
| 3671 } // namespace content | 3671 } // namespace content |
| OLD | NEW |