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

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
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 cdm_manager_(NULL), 1010 cdm_manager_(NULL),
1011 #endif 1011 #endif
1012 #if defined(VIDEO_HOLE) 1012 #if defined(VIDEO_HOLE)
1013 contains_media_player_(false), 1013 contains_media_player_(false),
1014 #endif 1014 #endif
1015 devtools_agent_(nullptr), 1015 devtools_agent_(nullptr),
1016 wakelock_dispatcher_(nullptr), 1016 wakelock_dispatcher_(nullptr),
1017 geolocation_dispatcher_(NULL), 1017 geolocation_dispatcher_(NULL),
1018 push_messaging_dispatcher_(NULL), 1018 push_messaging_dispatcher_(NULL),
1019 presentation_dispatcher_(NULL), 1019 presentation_dispatcher_(NULL),
1020 blink_service_registry_(service_registry_.GetWeakPtr()),
1020 screen_orientation_dispatcher_(NULL), 1021 screen_orientation_dispatcher_(NULL),
1021 manifest_manager_(NULL), 1022 manifest_manager_(NULL),
1022 accessibility_mode_(AccessibilityModeOff), 1023 accessibility_mode_(AccessibilityModeOff),
1023 renderer_accessibility_(NULL), 1024 renderer_accessibility_(NULL),
1024 media_player_delegate_(NULL), 1025 media_player_delegate_(NULL),
1025 is_using_lofi_(false), 1026 is_using_lofi_(false),
1026 is_pasting_(false), 1027 is_pasting_(false),
1027 weak_factory_(this) { 1028 weak_factory_(this) {
1028 std::pair<RoutingIDFrameMap::iterator, bool> result = 1029 std::pair<RoutingIDFrameMap::iterator, bool> result =
1029 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); 1030 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
(...skipping 4957 matching lines...) Expand 10 before | Expand all | Expand 10 after
5987 void RenderFrameImpl::checkIfAudioSinkExistsAndIsAuthorized( 5988 void RenderFrameImpl::checkIfAudioSinkExistsAndIsAuthorized(
5988 const blink::WebString& sink_id, 5989 const blink::WebString& sink_id,
5989 const blink::WebSecurityOrigin& security_origin, 5990 const blink::WebSecurityOrigin& security_origin,
5990 blink::WebSetSinkIdCallbacks* web_callbacks) { 5991 blink::WebSetSinkIdCallbacks* web_callbacks) {
5991 media::SwitchOutputDeviceCB callback = 5992 media::SwitchOutputDeviceCB callback =
5992 media::ConvertToSwitchOutputDeviceCB(web_callbacks); 5993 media::ConvertToSwitchOutputDeviceCB(web_callbacks);
5993 callback.Run(AudioDeviceFactory::GetOutputDeviceStatus( 5994 callback.Run(AudioDeviceFactory::GetOutputDeviceStatus(
5994 routing_id_, 0, sink_id.utf8(), security_origin)); 5995 routing_id_, 0, sink_id.utf8(), security_origin));
5995 } 5996 }
5996 5997
5998 blink::ServiceRegistry* RenderFrameImpl::serviceRegistry() {
5999 return &blink_service_registry_;
6000 }
6001
5997 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { 6002 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() {
5998 if (!is_main_frame_) 6003 if (!is_main_frame_)
5999 return nullptr; 6004 return nullptr;
6000 6005
6001 if (frame_->document().isPluginDocument()) 6006 if (frame_->document().isPluginDocument())
6002 return frame_->document().to<WebPluginDocument>().plugin(); 6007 return frame_->document().to<WebPluginDocument>().plugin();
6003 6008
6004 #if defined(ENABLE_PLUGINS) 6009 #if defined(ENABLE_PLUGINS)
6005 if (plugin_find_handler_) 6010 if (plugin_find_handler_)
6006 return plugin_find_handler_->container()->plugin(); 6011 return plugin_find_handler_->container()->plugin();
6007 #endif 6012 #endif
6008 6013
6009 return nullptr; 6014 return nullptr;
6010 } 6015 }
6011 6016
6012 void RenderFrameImpl::SendFindReply(int request_id, 6017 void RenderFrameImpl::SendFindReply(int request_id,
6013 int match_count, 6018 int match_count,
6014 int ordinal, 6019 int ordinal,
6015 const WebRect& selection_rect, 6020 const WebRect& selection_rect,
6016 bool final_status_update) { 6021 bool final_status_update) {
6017 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6022 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6018 selection_rect, ordinal, 6023 selection_rect, ordinal,
6019 final_status_update)); 6024 final_status_update));
6020 } 6025 }
6021 6026
6022 } // namespace content 6027 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698