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

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

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Use WeakPtr inside FrameInputHandlerImpl, add comments Created 3 years, 7 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 #include "content/renderer/devtools/devtools_agent.h" 104 #include "content/renderer/devtools/devtools_agent.h"
105 #include "content/renderer/dom_automation_controller.h" 105 #include "content/renderer/dom_automation_controller.h"
106 #include "content/renderer/effective_connection_type_helper.h" 106 #include "content/renderer/effective_connection_type_helper.h"
107 #include "content/renderer/external_popup_menu.h" 107 #include "content/renderer/external_popup_menu.h"
108 #include "content/renderer/frame_owner_properties.h" 108 #include "content/renderer/frame_owner_properties.h"
109 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 109 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
110 #include "content/renderer/history_entry.h" 110 #include "content/renderer/history_entry.h"
111 #include "content/renderer/history_serialization.h" 111 #include "content/renderer/history_serialization.h"
112 #include "content/renderer/image_downloader/image_downloader_impl.h" 112 #include "content/renderer/image_downloader/image_downloader_impl.h"
113 #include "content/renderer/ime_event_guard.h" 113 #include "content/renderer/ime_event_guard.h"
114 #include "content/renderer/input/frame_input_handler_impl.h"
114 #include "content/renderer/input/input_handler_manager.h" 115 #include "content/renderer/input/input_handler_manager.h"
115 #include "content/renderer/installedapp/related_apps_fetcher.h" 116 #include "content/renderer/installedapp/related_apps_fetcher.h"
116 #include "content/renderer/internal_document_state_data.h" 117 #include "content/renderer/internal_document_state_data.h"
117 #include "content/renderer/manifest/manifest_manager.h" 118 #include "content/renderer/manifest/manifest_manager.h"
118 #include "content/renderer/media/audio_device_factory.h" 119 #include "content/renderer/media/audio_device_factory.h"
119 #include "content/renderer/media/media_devices_listener_impl.h" 120 #include "content/renderer/media/media_devices_listener_impl.h"
120 #include "content/renderer/media/media_permission_dispatcher.h" 121 #include "content/renderer/media/media_permission_dispatcher.h"
121 #include "content/renderer/media/media_stream_dispatcher.h" 122 #include "content/renderer/media/media_stream_dispatcher.h"
122 #include "content/renderer/media/media_stream_renderer_factory_impl.h" 123 #include "content/renderer/media/media_stream_renderer_factory_impl.h"
123 #include "content/renderer/media/render_media_log.h" 124 #include "content/renderer/media/render_media_log.h"
(...skipping 6721 matching lines...) Expand 10 before | Expand all | Expand 10 after
6845 } 6846 }
6846 #endif // ENABLE_PLUGINS 6847 #endif // ENABLE_PLUGINS
6847 6848
6848 void RenderFrameImpl::RegisterMojoInterfaces() { 6849 void RenderFrameImpl::RegisterMojoInterfaces() {
6849 GetAssociatedInterfaceRegistry()->AddInterface( 6850 GetAssociatedInterfaceRegistry()->AddInterface(
6850 base::Bind(&RenderFrameImpl::BindEngagement, weak_factory_.GetWeakPtr())); 6851 base::Bind(&RenderFrameImpl::BindEngagement, weak_factory_.GetWeakPtr()));
6851 6852
6852 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind( 6853 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind(
6853 &RenderFrameImpl::BindFrameBindingsControl, weak_factory_.GetWeakPtr())); 6854 &RenderFrameImpl::BindFrameBindingsControl, weak_factory_.GetWeakPtr()));
6854 6855
6856 GetInterfaceRegistry()->AddInterface(base::Bind(
6857 &FrameInputHandlerImpl::CreateMojoService, weak_factory_.GetWeakPtr()));
6858
6855 if (!frame_->Parent()) { 6859 if (!frame_->Parent()) {
6856 // Only main frame have ImageDownloader service. 6860 // Only main frame have ImageDownloader service.
6857 GetInterfaceRegistry()->AddInterface(base::Bind( 6861 GetInterfaceRegistry()->AddInterface(base::Bind(
6858 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this))); 6862 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this)));
6859 6863
6860 // Host zoom is per-page, so only added on the main frame. 6864 // Host zoom is per-page, so only added on the main frame.
6861 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind( 6865 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind(
6862 &RenderFrameImpl::OnHostZoomClientRequest, weak_factory_.GetWeakPtr())); 6866 &RenderFrameImpl::OnHostZoomClientRequest, weak_factory_.GetWeakPtr()));
6863 } 6867 }
6864 } 6868 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
7074 policy(info.default_policy), 7078 policy(info.default_policy),
7075 replaces_current_history_item(info.replaces_current_history_item), 7079 replaces_current_history_item(info.replaces_current_history_item),
7076 history_navigation_in_new_child_frame( 7080 history_navigation_in_new_child_frame(
7077 info.is_history_navigation_in_new_child_frame), 7081 info.is_history_navigation_in_new_child_frame),
7078 client_redirect(info.is_client_redirect), 7082 client_redirect(info.is_client_redirect),
7079 cache_disabled(info.is_cache_disabled), 7083 cache_disabled(info.is_cache_disabled),
7080 form(info.form), 7084 form(info.form),
7081 source_location(info.source_location) {} 7085 source_location(info.source_location) {}
7082 7086
7083 } // namespace content 7087 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698