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

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: 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
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | 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 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 4968 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 const blink::WebString& sink_id, 6002 const blink::WebString& sink_id,
6002 const blink::WebSecurityOrigin& security_origin, 6003 const blink::WebSecurityOrigin& security_origin,
6003 blink::WebSetSinkIdCallbacks* web_callbacks) { 6004 blink::WebSetSinkIdCallbacks* web_callbacks) {
6004 media::OutputDeviceStatusCB callback = 6005 media::OutputDeviceStatusCB callback =
6005 media::ConvertToOutputDeviceStatusCB(web_callbacks); 6006 media::ConvertToOutputDeviceStatusCB(web_callbacks);
6006 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo( 6007 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo(
6007 routing_id_, 0, sink_id.utf8(), security_origin) 6008 routing_id_, 0, sink_id.utf8(), security_origin)
6008 .device_status()); 6009 .device_status());
6009 } 6010 }
6010 6011
6012 blink::ServiceRegistry* RenderFrameImpl::serviceRegistry() {
6013 return &blink_service_registry_;
6014 }
6015
6011 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { 6016 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() {
6012 if (!is_main_frame_) 6017 if (!is_main_frame_)
6013 return nullptr; 6018 return nullptr;
6014 6019
6015 if (frame_->document().isPluginDocument()) 6020 if (frame_->document().isPluginDocument())
6016 return frame_->document().to<WebPluginDocument>().plugin(); 6021 return frame_->document().to<WebPluginDocument>().plugin();
6017 6022
6018 #if defined(ENABLE_PLUGINS) 6023 #if defined(ENABLE_PLUGINS)
6019 if (plugin_find_handler_) 6024 if (plugin_find_handler_)
6020 return plugin_find_handler_->container()->plugin(); 6025 return plugin_find_handler_->container()->plugin();
6021 #endif 6026 #endif
6022 6027
6023 return nullptr; 6028 return nullptr;
6024 } 6029 }
6025 6030
6026 void RenderFrameImpl::SendFindReply(int request_id, 6031 void RenderFrameImpl::SendFindReply(int request_id,
6027 int match_count, 6032 int match_count,
6028 int ordinal, 6033 int ordinal,
6029 const WebRect& selection_rect, 6034 const WebRect& selection_rect,
6030 bool final_status_update) { 6035 bool final_status_update) {
6031 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6036 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6032 selection_rect, ordinal, 6037 selection_rect, ordinal,
6033 final_status_update)); 6038 final_status_update));
6034 } 6039 }
6035 6040
6036 } // namespace content 6041 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698