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

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

Issue 2797383002: Introduce RenderFrameVisitor (Closed)
Patch Set: Use the correct copyright notice 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
« no previous file with comments | « content/public/renderer/render_frame_visitor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5897 matching lines...) Expand 10 before | Expand all | Expand 10 after
6961 policy(info.default_policy), 6971 policy(info.default_policy),
6962 replaces_current_history_item(info.replaces_current_history_item), 6972 replaces_current_history_item(info.replaces_current_history_item),
6963 history_navigation_in_new_child_frame( 6973 history_navigation_in_new_child_frame(
6964 info.is_history_navigation_in_new_child_frame), 6974 info.is_history_navigation_in_new_child_frame),
6965 client_redirect(info.is_client_redirect), 6975 client_redirect(info.is_client_redirect),
6966 cache_disabled(info.is_cache_disabled), 6976 cache_disabled(info.is_cache_disabled),
6967 form(info.form), 6977 form(info.form),
6968 source_location(info.source_location) {} 6978 source_location(info.source_location) {}
6969 6979
6970 } // namespace content 6980 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/render_frame_visitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698