Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2797383002: Introduce RenderFrameVisitor (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "content/public/common/resource_response.h" 83 #include "content/public/common/resource_response.h"
84 #include "content/public/common/service_manager_connection.h" 84 #include "content/public/common/service_manager_connection.h"
85 #include "content/public/common/url_constants.h" 85 #include "content/public/common/url_constants.h"
86 #include "content/public/common/url_utils.h" 86 #include "content/public/common/url_utils.h"
87 #include "content/public/renderer/browser_plugin_delegate.h" 87 #include "content/public/renderer/browser_plugin_delegate.h"
88 #include "content/public/renderer/content_renderer_client.h" 88 #include "content/public/renderer/content_renderer_client.h"
89 #include "content/public/renderer/context_menu_client.h" 89 #include "content/public/renderer/context_menu_client.h"
90 #include "content/public/renderer/document_state.h" 90 #include "content/public/renderer/document_state.h"
91 #include "content/public/renderer/navigation_state.h" 91 #include "content/public/renderer/navigation_state.h"
92 #include "content/public/renderer/render_frame_observer.h" 92 #include "content/public/renderer/render_frame_observer.h"
93 #include "content/public/renderer/render_frame_visitor.h"
93 #include "content/public/renderer/renderer_ppapi_host.h" 94 #include "content/public/renderer/renderer_ppapi_host.h"
94 #include "content/renderer/accessibility/render_accessibility_impl.h" 95 #include "content/renderer/accessibility/render_accessibility_impl.h"
95 #include "content/renderer/browser_plugin/browser_plugin.h" 96 #include "content/renderer/browser_plugin/browser_plugin.h"
96 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 97 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
97 #include "content/renderer/child_frame_compositing_helper.h" 98 #include "content/renderer/child_frame_compositing_helper.h"
98 #include "content/renderer/content_security_policy_util.h" 99 #include "content/renderer/content_security_policy_util.h"
99 #include "content/renderer/context_menu_params_builder.h" 100 #include "content/renderer/context_menu_params_builder.h"
100 #include "content/renderer/devtools/devtools_agent.h" 101 #include "content/renderer/devtools/devtools_agent.h"
101 #include "content/renderer/dom_automation_controller.h" 102 #include "content/renderer/dom_automation_controller.h"
102 #include "content/renderer/effective_connection_type_helper.h" 103 #include "content/renderer/effective_connection_type_helper.h"
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 1045
1045 render_frame->Initialize(); 1046 render_frame->Initialize();
1046 } 1047 }
1047 1048
1048 // static 1049 // static
1049 RenderFrame* RenderFrame::FromWebFrame(blink::WebFrame* web_frame) { 1050 RenderFrame* RenderFrame::FromWebFrame(blink::WebFrame* web_frame) {
1050 return RenderFrameImpl::FromWebFrame(web_frame); 1051 return RenderFrameImpl::FromWebFrame(web_frame);
1051 } 1052 }
1052 1053
1053 // static 1054 // static
1055 void RenderFrame::ForEach(RenderFrameVisitor* visitor) {
1056 FrameMap* frames = g_frame_map.Pointer();
1057 for (FrameMap::iterator it = frames->begin(); it != frames->end(); ++it) {
1058 if (!visitor->Visit(it->second))
1059 return;
1060 }
1061 }
1062
1063 // static
1054 RenderFrameImpl* RenderFrameImpl::FromWebFrame(blink::WebFrame* web_frame) { 1064 RenderFrameImpl* RenderFrameImpl::FromWebFrame(blink::WebFrame* web_frame) {
1055 FrameMap::iterator iter = g_frame_map.Get().find(web_frame); 1065 FrameMap::iterator iter = g_frame_map.Get().find(web_frame);
1056 if (iter != g_frame_map.Get().end()) 1066 if (iter != g_frame_map.Get().end())
1057 return iter->second; 1067 return iter->second;
1058 return NULL; 1068 return NULL;
1059 } 1069 }
1060 1070
1061 // static 1071 // static
1062 void RenderFrameImpl::InstallCreateHook( 1072 void RenderFrameImpl::InstallCreateHook(
1063 CreateRenderFrameImplFunction create_render_frame_impl) { 1073 CreateRenderFrameImplFunction create_render_frame_impl) {
(...skipping 5908 matching lines...) Expand 10 before | Expand all | Expand 10 after
6972 policy(info.defaultPolicy), 6982 policy(info.defaultPolicy),
6973 replaces_current_history_item(info.replacesCurrentHistoryItem), 6983 replaces_current_history_item(info.replacesCurrentHistoryItem),
6974 history_navigation_in_new_child_frame( 6984 history_navigation_in_new_child_frame(
6975 info.isHistoryNavigationInNewChildFrame), 6985 info.isHistoryNavigationInNewChildFrame),
6976 client_redirect(info.isClientRedirect), 6986 client_redirect(info.isClientRedirect),
6977 cache_disabled(info.isCacheDisabled), 6987 cache_disabled(info.isCacheDisabled),
6978 form(info.form), 6988 form(info.form),
6979 source_location(info.sourceLocation) {} 6989 source_location(info.sourceLocation) {}
6980 6990
6981 } // namespace content 6991 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698