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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 focused_plugin_id_(-1), | 661 focused_plugin_id_(-1), |
662 #endif | 662 #endif |
663 #if defined(ENABLE_PLUGINS) | 663 #if defined(ENABLE_PLUGINS) |
664 plugin_find_handler_(NULL), | 664 plugin_find_handler_(NULL), |
665 focused_pepper_plugin_(NULL), | 665 focused_pepper_plugin_(NULL), |
666 pepper_last_mouse_event_target_(NULL), | 666 pepper_last_mouse_event_target_(NULL), |
667 #endif | 667 #endif |
668 enumeration_completion_id_(0), | 668 enumeration_completion_id_(0), |
669 session_storage_namespace_id_(params.session_storage_namespace_id), | 669 session_storage_namespace_id_(params.session_storage_namespace_id), |
670 next_snapshot_id_(0) { | 670 next_snapshot_id_(0) { |
| 671 LOG(ERROR) << "RV[" << this << "]::ctor:" |
| 672 << " process:" << getpid() |
| 673 << " routing_id:" << params.view_id; |
671 } | 674 } |
672 | 675 |
673 void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, | 676 void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
674 CompositorDependencies* compositor_deps, | 677 CompositorDependencies* compositor_deps, |
675 bool was_created_by_renderer) { | 678 bool was_created_by_renderer) { |
676 routing_id_ = params.view_id; | 679 routing_id_ = params.view_id; |
677 surface_id_ = params.surface_id; | 680 surface_id_ = params.surface_id; |
678 if (params.opener_route_id != MSG_ROUTING_NONE && was_created_by_renderer) | 681 if (params.opener_route_id != MSG_ROUTING_NONE && was_created_by_renderer) |
679 opener_id_ = params.opener_route_id; | 682 opener_id_ = params.opener_route_id; |
680 | 683 |
| 684 LOG(ERROR) << "RV[" << this << "]::Initialize:" |
| 685 << " process:" << getpid() |
| 686 << " routing_id:" << routing_id_; |
| 687 |
681 // Ensure we start with a valid next_page_id_ from the browser. | 688 // Ensure we start with a valid next_page_id_ from the browser. |
682 DCHECK_GE(next_page_id_, 0); | 689 DCHECK_GE(next_page_id_, 0); |
683 | 690 |
684 main_render_frame_.reset(RenderFrameImpl::Create( | 691 main_render_frame_.reset(RenderFrameImpl::Create( |
685 this, params.main_frame_routing_id)); | 692 this, params.main_frame_routing_id)); |
686 // The main frame WebLocalFrame object is closed by | 693 // The main frame WebLocalFrame object is closed by |
687 // RenderFrameImpl::frameDetached(). | 694 // RenderFrameImpl::frameDetached(). |
688 WebLocalFrame* web_frame = WebLocalFrame::create(main_render_frame_.get()); | 695 WebLocalFrame* web_frame = WebLocalFrame::create(main_render_frame_.get()); |
689 main_render_frame_->SetWebFrame(web_frame); | 696 main_render_frame_->SetWebFrame(web_frame); |
690 | 697 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) | 858 for (ViewMap::iterator it = views->begin(); it != views->end(); ++it) |
852 DCHECK_NE(this, it->second) << "Failed to call Close?"; | 859 DCHECK_NE(this, it->second) << "Failed to call Close?"; |
853 RoutingIDViewMap* routing_id_views = g_routing_id_view_map.Pointer(); | 860 RoutingIDViewMap* routing_id_views = g_routing_id_view_map.Pointer(); |
854 for (RoutingIDViewMap::iterator it = routing_id_views->begin(); | 861 for (RoutingIDViewMap::iterator it = routing_id_views->begin(); |
855 it != routing_id_views->end(); ++it) | 862 it != routing_id_views->end(); ++it) |
856 DCHECK_NE(this, it->second) << "Failed to call Close?"; | 863 DCHECK_NE(this, it->second) << "Failed to call Close?"; |
857 #endif | 864 #endif |
858 | 865 |
859 FOR_EACH_OBSERVER(RenderViewObserver, observers_, RenderViewGone()); | 866 FOR_EACH_OBSERVER(RenderViewObserver, observers_, RenderViewGone()); |
860 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnDestruct()); | 867 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnDestruct()); |
| 868 |
| 869 LOG(ERROR) << "RV[" << this << "]::dtor:" |
| 870 << " process:" << getpid() |
| 871 << " routing_id:" << routing_id_; |
861 } | 872 } |
862 | 873 |
863 /*static*/ | 874 /*static*/ |
864 RenderViewImpl* RenderViewImpl::FromWebView(WebView* webview) { | 875 RenderViewImpl* RenderViewImpl::FromWebView(WebView* webview) { |
865 ViewMap* views = g_view_map.Pointer(); | 876 ViewMap* views = g_view_map.Pointer(); |
866 ViewMap::iterator it = views->find(webview); | 877 ViewMap::iterator it = views->find(webview); |
867 return it == views->end() ? NULL : it->second; | 878 return it == views->end() ? NULL : it->second; |
868 } | 879 } |
869 | 880 |
870 /*static*/ | 881 /*static*/ |
(...skipping 3183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4054 std::vector<gfx::Size> sizes; | 4065 std::vector<gfx::Size> sizes; |
4055 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4066 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4056 if (!url.isEmpty()) | 4067 if (!url.isEmpty()) |
4057 urls.push_back( | 4068 urls.push_back( |
4058 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4069 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4059 } | 4070 } |
4060 SendUpdateFaviconURL(urls); | 4071 SendUpdateFaviconURL(urls); |
4061 } | 4072 } |
4062 | 4073 |
4063 } // namespace content | 4074 } // namespace content |
OLD | NEW |