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

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

Issue 1830883002: Add blink::ServiceRegistry and expose it from LocalFrame and Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 cdm_manager_(NULL), 1013 cdm_manager_(NULL),
1014 #endif 1014 #endif
1015 #if defined(VIDEO_HOLE) 1015 #if defined(VIDEO_HOLE)
1016 contains_media_player_(false), 1016 contains_media_player_(false),
1017 #endif 1017 #endif
1018 devtools_agent_(nullptr), 1018 devtools_agent_(nullptr),
1019 wakelock_dispatcher_(nullptr), 1019 wakelock_dispatcher_(nullptr),
1020 geolocation_dispatcher_(NULL), 1020 geolocation_dispatcher_(NULL),
1021 push_messaging_dispatcher_(NULL), 1021 push_messaging_dispatcher_(NULL),
1022 presentation_dispatcher_(NULL), 1022 presentation_dispatcher_(NULL),
1023 blink_service_registry_(service_registry_.GetWeakPtr()),
1023 screen_orientation_dispatcher_(NULL), 1024 screen_orientation_dispatcher_(NULL),
1024 manifest_manager_(NULL), 1025 manifest_manager_(NULL),
1025 accessibility_mode_(AccessibilityModeOff), 1026 accessibility_mode_(AccessibilityModeOff),
1026 renderer_accessibility_(NULL), 1027 renderer_accessibility_(NULL),
1027 media_player_delegate_(NULL), 1028 media_player_delegate_(NULL),
1028 is_using_lofi_(false), 1029 is_using_lofi_(false),
1029 is_pasting_(false), 1030 is_pasting_(false),
1030 blame_context_(nullptr), 1031 blame_context_(nullptr),
1031 weak_factory_(this) { 1032 weak_factory_(this) {
1032 std::pair<RoutingIDFrameMap::iterator, bool> result = 1033 std::pair<RoutingIDFrameMap::iterator, bool> result =
(...skipping 4970 matching lines...) Expand 10 before | Expand all | Expand 10 after
6003 const blink::WebString& sink_id, 6004 const blink::WebString& sink_id,
6004 const blink::WebSecurityOrigin& security_origin, 6005 const blink::WebSecurityOrigin& security_origin,
6005 blink::WebSetSinkIdCallbacks* web_callbacks) { 6006 blink::WebSetSinkIdCallbacks* web_callbacks) {
6006 media::OutputDeviceStatusCB callback = 6007 media::OutputDeviceStatusCB callback =
6007 media::ConvertToOutputDeviceStatusCB(web_callbacks); 6008 media::ConvertToOutputDeviceStatusCB(web_callbacks);
6008 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo( 6009 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo(
6009 routing_id_, 0, sink_id.utf8(), security_origin) 6010 routing_id_, 0, sink_id.utf8(), security_origin)
6010 .device_status()); 6011 .device_status());
6011 } 6012 }
6012 6013
6014 blink::ServiceRegistry* RenderFrameImpl::serviceRegistry() {
6015 return &blink_service_registry_;
6016 }
6017
6013 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { 6018 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() {
6014 if (!is_main_frame_) 6019 if (!is_main_frame_)
6015 return nullptr; 6020 return nullptr;
6016 6021
6017 if (frame_->document().isPluginDocument()) 6022 if (frame_->document().isPluginDocument())
6018 return frame_->document().to<WebPluginDocument>().plugin(); 6023 return frame_->document().to<WebPluginDocument>().plugin();
6019 6024
6020 #if defined(ENABLE_PLUGINS) 6025 #if defined(ENABLE_PLUGINS)
6021 if (plugin_find_handler_) 6026 if (plugin_find_handler_)
6022 return plugin_find_handler_->container()->plugin(); 6027 return plugin_find_handler_->container()->plugin();
6023 #endif 6028 #endif
6024 6029
6025 return nullptr; 6030 return nullptr;
6026 } 6031 }
6027 6032
6028 void RenderFrameImpl::SendFindReply(int request_id, 6033 void RenderFrameImpl::SendFindReply(int request_id,
6029 int match_count, 6034 int match_count,
6030 int ordinal, 6035 int ordinal,
6031 const WebRect& selection_rect, 6036 const WebRect& selection_rect,
6032 bool final_status_update) { 6037 bool final_status_update) {
6033 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6038 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6034 selection_rect, ordinal, 6039 selection_rect, ordinal,
6035 final_status_update)); 6040 final_status_update));
6036 } 6041 }
6037 6042
6038 } // namespace content 6043 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698