| 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 ApplyWebPreferences(webkit_preferences_, webview()); | 722 ApplyWebPreferences(webkit_preferences_, webview()); |
| 723 | 723 |
| 724 RenderFrameProxy* proxy = NULL; | 724 RenderFrameProxy* proxy = NULL; |
| 725 if (params.proxy_routing_id != MSG_ROUTING_NONE) { | 725 if (params.proxy_routing_id != MSG_ROUTING_NONE) { |
| 726 CHECK(params.swapped_out); | 726 CHECK(params.swapped_out); |
| 727 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( | 727 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( |
| 728 main_render_frame_.get(), params.proxy_routing_id); | 728 main_render_frame_.get(), params.proxy_routing_id); |
| 729 main_render_frame_->set_render_frame_proxy(proxy); | 729 main_render_frame_->set_render_frame_proxy(proxy); |
| 730 } | 730 } |
| 731 | 731 |
| 732 // This breaks postMessage otherwise. |
| 733 // |
| 734 // The following assumption that we can use the WebRemoteFrame as the |
| 735 // main frame doesn't hold for <webview>, because our top level frame |
| 736 // is the guest's main frame. The proxy that created this WebRemoteFrame |
| 737 // is merely a proxy to the guest and is not part of the frame tree. |
| 738 // TODO(lazyboy): Find a solution here since this breaks regular OOPIF. |
| 739 webview()->setMainFrame(main_render_frame_->GetWebFrame()); |
| 740 /* |
| 732 // In --site-per-process, just use the WebRemoteFrame as the main frame. | 741 // In --site-per-process, just use the WebRemoteFrame as the main frame. |
| 733 if (command_line.HasSwitch(switches::kSitePerProcess) && proxy) { | 742 if (command_line.HasSwitch(switches::kSitePerProcess) && proxy) { |
| 734 webview()->setMainFrame(proxy->web_frame()); | 743 webview()->setMainFrame(proxy->web_frame()); |
| 735 // Initialize the WebRemoteFrame with information replicated from the | 744 // Initialize the WebRemoteFrame with information replicated from the |
| 736 // browser process. | 745 // browser process. |
| 737 proxy->SetReplicatedState(params.replicated_frame_state); | 746 proxy->SetReplicatedState(params.replicated_frame_state); |
| 738 } else { | 747 } else { |
| 739 webview()->setMainFrame(main_render_frame_->GetWebFrame()); | 748 webview()->setMainFrame(main_render_frame_->GetWebFrame()); |
| 740 } | 749 } |
| 750 */ |
| 741 main_render_frame_->Initialize(); | 751 main_render_frame_->Initialize(); |
| 742 | 752 |
| 743 if (switches::IsTouchDragDropEnabled()) | 753 if (switches::IsTouchDragDropEnabled()) |
| 744 webview()->settings()->setTouchDragDropEnabled(true); | 754 webview()->settings()->setTouchDragDropEnabled(true); |
| 745 | 755 |
| 746 if (switches::IsTouchEditingEnabled()) | 756 if (switches::IsTouchEditingEnabled()) |
| 747 webview()->settings()->setTouchEditingEnabled(true); | 757 webview()->settings()->setTouchEditingEnabled(true); |
| 748 | 758 |
| 749 if (!params.frame_name.empty()) | 759 if (!params.frame_name.empty()) |
| 750 webview()->mainFrame()->setName(params.frame_name); | 760 webview()->mainFrame()->setName(params.frame_name); |
| (...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3800 std::vector<gfx::Size> sizes; | 3810 std::vector<gfx::Size> sizes; |
| 3801 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3811 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3802 if (!url.isEmpty()) | 3812 if (!url.isEmpty()) |
| 3803 urls.push_back( | 3813 urls.push_back( |
| 3804 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3814 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3805 } | 3815 } |
| 3806 SendUpdateFaviconURL(urls); | 3816 SendUpdateFaviconURL(urls); |
| 3807 } | 3817 } |
| 3808 | 3818 |
| 3809 } // namespace content | 3819 } // namespace content |
| OLD | NEW |