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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 | 672 |
673 main_render_frame_.reset(RenderFrameImpl::Create( | 673 main_render_frame_.reset(RenderFrameImpl::Create( |
674 this, params->main_frame_routing_id)); | 674 this, params->main_frame_routing_id)); |
675 // The main frame WebLocalFrame object is closed by | 675 // The main frame WebLocalFrame object is closed by |
676 // RenderFrameImpl::frameDetached(). | 676 // RenderFrameImpl::frameDetached(). |
677 WebLocalFrame* web_frame = WebLocalFrame::create(main_render_frame_.get()); | 677 WebLocalFrame* web_frame = WebLocalFrame::create(main_render_frame_.get()); |
678 main_render_frame_->SetWebFrame(web_frame); | 678 main_render_frame_->SetWebFrame(web_frame); |
679 | 679 |
680 if (params->proxy_routing_id != MSG_ROUTING_NONE) { | 680 if (params->proxy_routing_id != MSG_ROUTING_NONE) { |
681 CHECK(params->swapped_out); | 681 CHECK(params->swapped_out); |
682 RenderFrameProxy* proxy = | 682 RenderFrameProxy* proxy = RenderFrameProxy::CreateProxyToReplaceFrame( |
683 RenderFrameProxy::CreateFrameProxy(params->proxy_routing_id, | 683 params->proxy_routing_id, params->main_frame_routing_id); |
684 params->main_frame_routing_id); | |
685 main_render_frame_->set_render_frame_proxy(proxy); | 684 main_render_frame_->set_render_frame_proxy(proxy); |
686 } | 685 } |
687 | 686 |
688 webwidget_ = WebView::create(this); | 687 webwidget_ = WebView::create(this); |
689 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); | 688 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); |
690 | 689 |
691 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 690 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
692 | 691 |
693 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 692 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
694 stats_collection_observer_.reset(new StatsCollectionObserver(this)); | 693 stats_collection_observer_.reset(new StatsCollectionObserver(this)); |
(...skipping 3318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4013 std::vector<gfx::Size> sizes; | 4012 std::vector<gfx::Size> sizes; |
4014 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4013 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4015 if (!url.isEmpty()) | 4014 if (!url.isEmpty()) |
4016 urls.push_back( | 4015 urls.push_back( |
4017 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4016 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4018 } | 4017 } |
4019 SendUpdateFaviconURL(urls); | 4018 SendUpdateFaviconURL(urls); |
4020 } | 4019 } |
4021 | 4020 |
4022 } // namespace content | 4021 } // namespace content |
OLD | NEW |