Chromium Code Reviews| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 746 command_line.HasSwitch(switches::kAllowInsecureWebSocketFromHttpsOrigin)); | 746 command_line.HasSwitch(switches::kAllowInsecureWebSocketFromHttpsOrigin)); |
| 747 | 747 |
| 748 RenderFrameProxy* proxy = NULL; | 748 RenderFrameProxy* proxy = NULL; |
| 749 if (params.proxy_routing_id != MSG_ROUTING_NONE) { | 749 if (params.proxy_routing_id != MSG_ROUTING_NONE) { |
| 750 CHECK(params.swapped_out); | 750 CHECK(params.swapped_out); |
| 751 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( | 751 proxy = RenderFrameProxy::CreateProxyToReplaceFrame( |
| 752 main_render_frame_.get(), params.proxy_routing_id); | 752 main_render_frame_.get(), params.proxy_routing_id); |
| 753 main_render_frame_->set_render_frame_proxy(proxy); | 753 main_render_frame_->set_render_frame_proxy(proxy); |
| 754 } | 754 } |
| 755 | 755 |
| 756 // This breaks postMessage otherwise. | |
| 757 webview()->setMainFrame(main_render_frame_->GetWebFrame()); | |
|
Fady Samuel
2015/03/04 22:21:06
What does this do?
| |
| 758 /* | |
| 756 // In --site-per-process, just use the WebRemoteFrame as the main frame. | 759 // In --site-per-process, just use the WebRemoteFrame as the main frame. |
| 757 if (command_line.HasSwitch(switches::kSitePerProcess) && proxy) { | 760 if (command_line.HasSwitch(switches::kSitePerProcess) && proxy) { |
| 758 webview()->setMainFrame(proxy->web_frame()); | 761 webview()->setMainFrame(proxy->web_frame()); |
| 759 // Initialize the WebRemoteFrame with information replicated from the | 762 // Initialize the WebRemoteFrame with information replicated from the |
| 760 // browser process. | 763 // browser process. |
| 761 proxy->SetReplicatedState(params.replicated_frame_state); | 764 proxy->SetReplicatedState(params.replicated_frame_state); |
| 762 } else { | 765 } else { |
| 763 webview()->setMainFrame(main_render_frame_->GetWebFrame()); | 766 webview()->setMainFrame(main_render_frame_->GetWebFrame()); |
| 764 } | 767 } |
| 768 */ | |
| 765 main_render_frame_->Initialize(); | 769 main_render_frame_->Initialize(); |
| 766 | 770 |
| 767 if (switches::IsTouchDragDropEnabled()) | 771 if (switches::IsTouchDragDropEnabled()) |
| 768 webview()->settings()->setTouchDragDropEnabled(true); | 772 webview()->settings()->setTouchDragDropEnabled(true); |
| 769 | 773 |
| 770 if (switches::IsTouchEditingEnabled()) | 774 if (switches::IsTouchEditingEnabled()) |
| 771 webview()->settings()->setTouchEditingEnabled(true); | 775 webview()->settings()->setTouchEditingEnabled(true); |
| 772 | 776 |
| 773 if (!params.frame_name.empty()) | 777 if (!params.frame_name.empty()) |
| 774 webview()->mainFrame()->setName(params.frame_name); | 778 webview()->mainFrame()->setName(params.frame_name); |
| (...skipping 3282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4057 std::vector<gfx::Size> sizes; | 4061 std::vector<gfx::Size> sizes; |
| 4058 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4062 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4059 if (!url.isEmpty()) | 4063 if (!url.isEmpty()) |
| 4060 urls.push_back( | 4064 urls.push_back( |
| 4061 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4065 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4062 } | 4066 } |
| 4063 SendUpdateFaviconURL(urls); | 4067 SendUpdateFaviconURL(urls); |
| 4064 } | 4068 } |
| 4065 | 4069 |
| 4066 } // namespace content | 4070 } // namespace content |
| OLD | NEW |