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

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

Issue 975533002: Move didClearWindowObject to RenderFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 (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 13 matching lines...) Expand all
24 #include "base/process/kill.h" 24 #include "base/process/kill.h"
25 #include "base/process/process.h" 25 #include "base/process/process.h"
26 #include "base/strings/string_number_conversions.h" 26 #include "base/strings/string_number_conversions.h"
27 #include "base/strings/string_piece.h" 27 #include "base/strings/string_piece.h"
28 #include "base/strings/string_split.h" 28 #include "base/strings/string_split.h"
29 #include "base/strings/string_util.h" 29 #include "base/strings/string_util.h"
30 #include "base/strings/sys_string_conversions.h" 30 #include "base/strings/sys_string_conversions.h"
31 #include "base/strings/utf_string_conversions.h" 31 #include "base/strings/utf_string_conversions.h"
32 #include "base/time/time.h" 32 #include "base/time/time.h"
33 #include "base/trace_event/trace_event.h" 33 #include "base/trace_event/trace_event.h"
34 #include "cc/base/switches.h"
35 #include "content/child/appcache/appcache_dispatcher.h" 34 #include "content/child/appcache/appcache_dispatcher.h"
36 #include "content/child/appcache/web_application_cache_host_impl.h" 35 #include "content/child/appcache/web_application_cache_host_impl.h"
37 #include "content/child/child_shared_bitmap_manager.h" 36 #include "content/child/child_shared_bitmap_manager.h"
38 #include "content/child/npapi/webplugin_delegate_impl.h" 37 #include "content/child/npapi/webplugin_delegate_impl.h"
39 #include "content/child/request_extra_data.h" 38 #include "content/child/request_extra_data.h"
40 #include "content/child/v8_value_converter_impl.h" 39 #include "content/child/v8_value_converter_impl.h"
41 #include "content/child/webmessageportchannel_impl.h" 40 #include "content/child/webmessageportchannel_impl.h"
42 #include "content/common/content_constants_internal.h" 41 #include "content/common/content_constants_internal.h"
43 #include "content/common/database_messages.h" 42 #include "content/common/database_messages.h"
44 #include "content/common/dom_storage/dom_storage_types.h" 43 #include "content/common/dom_storage/dom_storage_types.h"
(...skipping 24 matching lines...) Expand all
69 #include "content/public/renderer/document_state.h" 68 #include "content/public/renderer/document_state.h"
70 #include "content/public/renderer/navigation_state.h" 69 #include "content/public/renderer/navigation_state.h"
71 #include "content/public/renderer/render_view_observer.h" 70 #include "content/public/renderer/render_view_observer.h"
72 #include "content/public/renderer/render_view_visitor.h" 71 #include "content/public/renderer/render_view_visitor.h"
73 #include "content/renderer/browser_plugin/browser_plugin.h" 72 #include "content/renderer/browser_plugin/browser_plugin.h"
74 #include "content/renderer/browser_plugin/browser_plugin_manager.h" 73 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
75 #include "content/renderer/devtools/devtools_agent.h" 74 #include "content/renderer/devtools/devtools_agent.h"
76 #include "content/renderer/disambiguation_popup_helper.h" 75 #include "content/renderer/disambiguation_popup_helper.h"
77 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 76 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
78 #include "content/renderer/drop_data_builder.h" 77 #include "content/renderer/drop_data_builder.h"
79 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
80 #include "content/renderer/gpu/render_widget_compositor.h" 78 #include "content/renderer/gpu/render_widget_compositor.h"
81 #include "content/renderer/history_controller.h" 79 #include "content/renderer/history_controller.h"
82 #include "content/renderer/history_serialization.h" 80 #include "content/renderer/history_serialization.h"
83 #include "content/renderer/idle_user_detector.h" 81 #include "content/renderer/idle_user_detector.h"
84 #include "content/renderer/ime_event_guard.h" 82 #include "content/renderer/ime_event_guard.h"
85 #include "content/renderer/input/input_handler_manager.h" 83 #include "content/renderer/input/input_handler_manager.h"
86 #include "content/renderer/internal_document_state_data.h" 84 #include "content/renderer/internal_document_state_data.h"
87 #include "content/renderer/media/audio_device_factory.h" 85 #include "content/renderer/media/audio_device_factory.h"
88 #include "content/renderer/media/video_capture_impl_manager.h" 86 #include "content/renderer/media/video_capture_impl_manager.h"
89 #include "content/renderer/memory_benchmarking_extension.h"
90 #include "content/renderer/mhtml_generator.h" 87 #include "content/renderer/mhtml_generator.h"
91 #include "content/renderer/net_info_helper.h" 88 #include "content/renderer/net_info_helper.h"
92 #include "content/renderer/render_frame_impl.h" 89 #include "content/renderer/render_frame_impl.h"
93 #include "content/renderer/render_frame_proxy.h" 90 #include "content/renderer/render_frame_proxy.h"
94 #include "content/renderer/render_process.h" 91 #include "content/renderer/render_process.h"
95 #include "content/renderer/render_thread_impl.h" 92 #include "content/renderer/render_thread_impl.h"
96 #include "content/renderer/render_view_mouse_lock_dispatcher.h" 93 #include "content/renderer/render_view_mouse_lock_dispatcher.h"
97 #include "content/renderer/render_widget_fullscreen_pepper.h" 94 #include "content/renderer/render_widget_fullscreen_pepper.h"
98 #include "content/renderer/renderer_webapplicationcachehost_impl.h" 95 #include "content/renderer/renderer_webapplicationcachehost_impl.h"
99 #include "content/renderer/resizing_mode_selector.h" 96 #include "content/renderer/resizing_mode_selector.h"
100 #include "content/renderer/savable_resources.h" 97 #include "content/renderer/savable_resources.h"
101 #include "content/renderer/skia_benchmarking_extension.h"
102 #include "content/renderer/speech_recognition_dispatcher.h" 98 #include "content/renderer/speech_recognition_dispatcher.h"
103 #include "content/renderer/stats_collection_controller.h"
104 #include "content/renderer/stats_collection_observer.h"
105 #include "content/renderer/text_input_client_observer.h" 99 #include "content/renderer/text_input_client_observer.h"
106 #include "content/renderer/web_ui_extension.h"
107 #include "content/renderer/web_ui_extension_data.h" 100 #include "content/renderer/web_ui_extension_data.h"
108 #include "content/renderer/web_ui_mojo.h" 101 #include "content/renderer/web_ui_mojo.h"
109 #include "content/renderer/websharedworker_proxy.h" 102 #include "content/renderer/websharedworker_proxy.h"
110 #include "media/audio/audio_output_device.h" 103 #include "media/audio/audio_output_device.h"
111 #include "media/base/media_switches.h" 104 #include "media/base/media_switches.h"
112 #include "media/filters/gpu_video_accelerator_factories.h" 105 #include "media/filters/gpu_video_accelerator_factories.h"
113 #include "media/renderers/audio_renderer_impl.h" 106 #include "media/renderers/audio_renderer_impl.h"
114 #include "net/base/data_url.h" 107 #include "net/base/data_url.h"
115 #include "net/base/escape.h" 108 #include "net/base/escape.h"
116 #include "net/base/net_errors.h" 109 #include "net/base/net_errors.h"
(...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2287 navigation_state->set_transferred_request_request_id( 2280 navigation_state->set_transferred_request_request_id(
2288 params.transferred_request_request_id); 2281 params.transferred_request_request_id);
2289 navigation_state->set_allow_download(params.common_params.allow_download); 2282 navigation_state->set_allow_download(params.common_params.allow_download);
2290 navigation_state->set_extra_headers(params.extra_headers); 2283 navigation_state->set_extra_headers(params.extra_headers);
2291 } else { 2284 } else {
2292 navigation_state = NavigationState::CreateContentInitiated(); 2285 navigation_state = NavigationState::CreateContentInitiated();
2293 } 2286 }
2294 return navigation_state; 2287 return navigation_state;
2295 } 2288 }
2296 2289
2297 void RenderViewImpl::didClearWindowObject(WebLocalFrame* frame) {
2298 FOR_EACH_OBSERVER(
2299 RenderViewObserver, observers_, DidClearWindowObject(frame));
2300
2301 if (enabled_bindings_& BINDINGS_POLICY_WEB_UI)
2302 WebUIExtension::Install(frame);
2303
2304 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION)
2305 StatsCollectionController::Install(frame);
2306
2307 const base::CommandLine& command_line =
2308 *base::CommandLine::ForCurrentProcess();
2309
2310 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking))
2311 SkiaBenchmarking::Install(frame);
2312
2313 if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking))
2314 GpuBenchmarking::Install(frame);
2315
2316 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking))
2317 MemoryBenchmarkingExtension::Install(frame);
2318 }
2319
2320 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, 2290 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame,
2321 WebIconURL::Type icon_type) { 2291 WebIconURL::Type icon_type) {
2322 if (frame->parent()) 2292 if (frame->parent())
2323 return; 2293 return;
2324 2294
2325 if (!TouchEnabled() && icon_type != WebIconURL::TypeFavicon) 2295 if (!TouchEnabled() && icon_type != WebIconURL::TypeFavicon)
2326 return; 2296 return;
2327 2297
2328 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); 2298 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type);
2329 std::vector<FaviconURL> urls; 2299 std::vector<FaviconURL> urls;
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
4031 std::vector<gfx::Size> sizes; 4001 std::vector<gfx::Size> sizes;
4032 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4002 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4033 if (!url.isEmpty()) 4003 if (!url.isEmpty())
4034 urls.push_back( 4004 urls.push_back(
4035 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4005 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4036 } 4006 }
4037 SendUpdateFaviconURL(urls); 4007 SendUpdateFaviconURL(urls);
4038 } 4008 }
4039 4009
4040 } // namespace content 4010 } // namespace content
OLDNEW
« content/renderer/render_frame_impl.cc ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698