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

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

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Fix dcheng's initial 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 6723 matching lines...) Expand 10 before | Expand all | Expand 10 after
6847 } 6848 }
6848 #endif // ENABLE_PLUGINS 6849 #endif // ENABLE_PLUGINS
6849 6850
6850 void RenderFrameImpl::RegisterMojoInterfaces() { 6851 void RenderFrameImpl::RegisterMojoInterfaces() {
6851 GetAssociatedInterfaceRegistry()->AddInterface( 6852 GetAssociatedInterfaceRegistry()->AddInterface(
6852 base::Bind(&RenderFrameImpl::BindEngagement, weak_factory_.GetWeakPtr())); 6853 base::Bind(&RenderFrameImpl::BindEngagement, weak_factory_.GetWeakPtr()));
6853 6854
6854 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind( 6855 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind(
6855 &RenderFrameImpl::BindFrameBindingsControl, weak_factory_.GetWeakPtr())); 6856 &RenderFrameImpl::BindFrameBindingsControl, weak_factory_.GetWeakPtr()));
6856 6857
6858 GetInterfaceRegistry()->AddInterface(base::Bind(
6859 &FrameInputHandlerImpl::CreateMojoService, base::Unretained(this)));
6860
6857 if (!frame_->Parent()) { 6861 if (!frame_->Parent()) {
6858 // Only main frame have ImageDownloader service. 6862 // Only main frame have ImageDownloader service.
6859 GetInterfaceRegistry()->AddInterface(base::Bind( 6863 GetInterfaceRegistry()->AddInterface(base::Bind(
6860 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this))); 6864 &ImageDownloaderImpl::CreateMojoService, base::Unretained(this)));
6861 6865
6862 // Host zoom is per-page, so only added on the main frame. 6866 // Host zoom is per-page, so only added on the main frame.
6863 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind( 6867 GetAssociatedInterfaceRegistry()->AddInterface(base::Bind(
6864 &RenderFrameImpl::OnHostZoomClientRequest, weak_factory_.GetWeakPtr())); 6868 &RenderFrameImpl::OnHostZoomClientRequest, weak_factory_.GetWeakPtr()));
6865 } 6869 }
6866 } 6870 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
7071 policy(info.default_policy), 7075 policy(info.default_policy),
7072 replaces_current_history_item(info.replaces_current_history_item), 7076 replaces_current_history_item(info.replaces_current_history_item),
7073 history_navigation_in_new_child_frame( 7077 history_navigation_in_new_child_frame(
7074 info.is_history_navigation_in_new_child_frame), 7078 info.is_history_navigation_in_new_child_frame),
7075 client_redirect(info.is_client_redirect), 7079 client_redirect(info.is_client_redirect),
7076 cache_disabled(info.is_cache_disabled), 7080 cache_disabled(info.is_cache_disabled),
7077 form(info.form), 7081 form(info.form),
7078 source_location(info.source_location) {} 7082 source_location(info.source_location) {}
7079 7083
7080 } // namespace content 7084 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698