| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 main_render_frame_->set_render_frame_proxy(proxy); | 702 main_render_frame_->set_render_frame_proxy(proxy); |
| 703 } else { | 703 } else { |
| 704 proxy = RenderFrameProxy::CreateFrameProxy( | 704 proxy = RenderFrameProxy::CreateFrameProxy( |
| 705 params.proxy_routing_id, | 705 params.proxy_routing_id, |
| 706 MSG_ROUTING_NONE, | 706 MSG_ROUTING_NONE, |
| 707 routing_id_, | 707 routing_id_, |
| 708 params.replicated_frame_state); | 708 params.replicated_frame_state); |
| 709 } | 709 } |
| 710 } | 710 } |
| 711 | 711 |
| 712 // In --site-per-process, just use the WebRemoteFrame as the main frame. | 712 // When not using swapped out state, just use the WebRemoteFrame as the main |
| 713 if (command_line.HasSwitch(switches::kSitePerProcess) && proxy) { | 713 // frame. |
| 714 if (proxy && RenderFrameProxy::IsSwappedOutStateForbidden()) { |
| 714 webview()->setMainFrame(proxy->web_frame()); | 715 webview()->setMainFrame(proxy->web_frame()); |
| 715 // Initialize the WebRemoteFrame with information replicated from the | 716 // Initialize the WebRemoteFrame with information replicated from the |
| 716 // browser process. | 717 // browser process. |
| 717 proxy->SetReplicatedState(params.replicated_frame_state); | 718 proxy->SetReplicatedState(params.replicated_frame_state); |
| 718 } else { | 719 } else { |
| 719 webview()->setMainFrame(main_render_frame_->GetWebFrame()); | 720 webview()->setMainFrame(main_render_frame_->GetWebFrame()); |
| 720 } | 721 } |
| 721 if (main_render_frame_) | 722 if (main_render_frame_) |
| 722 main_render_frame_->Initialize(); | 723 main_render_frame_->Initialize(); |
| 723 | 724 |
| (...skipping 3092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3816 std::vector<gfx::Size> sizes; | 3817 std::vector<gfx::Size> sizes; |
| 3817 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3818 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3818 if (!url.isEmpty()) | 3819 if (!url.isEmpty()) |
| 3819 urls.push_back( | 3820 urls.push_back( |
| 3820 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3821 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3821 } | 3822 } |
| 3822 SendUpdateFaviconURL(urls); | 3823 SendUpdateFaviconURL(urls); |
| 3823 } | 3824 } |
| 3824 | 3825 |
| 3825 } // namespace content | 3826 } // namespace content |
| OLD | NEW |