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

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

Issue 285333003: Support exposing Mojo services between render frames, render threads, and their respective hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InterfaceRequest in RenderFrameSetup Created 6 years, 6 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 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/process/process_handle.h" 16 #include "base/process/process_handle.h"
17 #include "content/common/mojo/service_registry_impl.h"
17 #include "content/public/common/javascript_message_type.h" 18 #include "content/public/common/javascript_message_type.h"
18 #include "content/public/common/referrer.h" 19 #include "content/public/common/referrer.h"
19 #include "content/public/renderer/render_frame.h" 20 #include "content/public/renderer/render_frame.h"
20 #include "content/renderer/media/webmediaplayer_delegate.h" 21 #include "content/renderer/media/webmediaplayer_delegate.h"
21 #include "content/renderer/render_frame_proxy.h" 22 #include "content/renderer/render_frame_proxy.h"
22 #include "content/renderer/renderer_webcookiejar_impl.h" 23 #include "content/renderer/renderer_webcookiejar_impl.h"
23 #include "ipc/ipc_message.h" 24 #include "ipc/ipc_message.h"
24 #include "third_party/WebKit/public/web/WebDataSource.h" 25 #include "third_party/WebKit/public/web/WebDataSource.h"
25 #include "third_party/WebKit/public/web/WebFrameClient.h" 26 #include "third_party/WebKit/public/web/WebFrameClient.h"
26 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" 27 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 virtual blink::WebNode GetContextMenuNode() const OVERRIDE; 220 virtual blink::WebNode GetContextMenuNode() const OVERRIDE;
220 virtual blink::WebPlugin* CreatePlugin( 221 virtual blink::WebPlugin* CreatePlugin(
221 blink::WebFrame* frame, 222 blink::WebFrame* frame,
222 const WebPluginInfo& info, 223 const WebPluginInfo& info,
223 const blink::WebPluginParams& params) OVERRIDE; 224 const blink::WebPluginParams& params) OVERRIDE;
224 virtual void LoadURLExternally(blink::WebLocalFrame* frame, 225 virtual void LoadURLExternally(blink::WebLocalFrame* frame,
225 const blink::WebURLRequest& request, 226 const blink::WebURLRequest& request,
226 blink::WebNavigationPolicy policy) OVERRIDE; 227 blink::WebNavigationPolicy policy) OVERRIDE;
227 virtual void ExecuteJavaScript(const base::string16& javascript) OVERRIDE; 228 virtual void ExecuteJavaScript(const base::string16& javascript) OVERRIDE;
228 virtual bool IsHidden() OVERRIDE; 229 virtual bool IsHidden() OVERRIDE;
230 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE;
229 231
230 // blink::WebFrameClient implementation: 232 // blink::WebFrameClient implementation:
231 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, 233 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame,
232 const blink::WebPluginParams& params); 234 const blink::WebPluginParams& params);
233 virtual blink::WebMediaPlayer* createMediaPlayer( 235 virtual blink::WebMediaPlayer* createMediaPlayer(
234 blink::WebLocalFrame* frame, 236 blink::WebLocalFrame* frame,
235 const blink::WebURL& url, 237 const blink::WebURL& url,
236 blink::WebMediaPlayerClient* client); 238 blink::WebMediaPlayerClient* client);
237 virtual blink::WebContentDecryptionModule* createContentDecryptionModule( 239 virtual blink::WebContentDecryptionModule* createContentDecryptionModule(
238 blink::WebLocalFrame* frame, 240 blink::WebLocalFrame* frame,
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 540
539 #if defined(OS_ANDROID) 541 #if defined(OS_ANDROID)
540 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( 542 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
541 const blink::WebURL& url, 543 const blink::WebURL& url,
542 blink::WebMediaPlayerClient* client); 544 blink::WebMediaPlayerClient* client);
543 545
544 RendererMediaPlayerManager* GetMediaPlayerManager(); 546 RendererMediaPlayerManager* GetMediaPlayerManager();
545 RendererCdmManager* GetCdmManager(); 547 RendererCdmManager* GetCdmManager();
546 #endif 548 #endif
547 549
550 // Initializes the ServiceRegistry for this frame by binding it to the
551 // corresponding host ServiceRegistry.
552 void InitializeServiceRegistry();
553
548 // Stores the WebLocalFrame we are associated with. 554 // Stores the WebLocalFrame we are associated with.
549 blink::WebLocalFrame* frame_; 555 blink::WebLocalFrame* frame_;
550 556
551 base::WeakPtr<RenderViewImpl> render_view_; 557 base::WeakPtr<RenderViewImpl> render_view_;
552 int routing_id_; 558 int routing_id_;
553 bool is_swapped_out_; 559 bool is_swapped_out_;
554 // RenderFrameProxy exists only when is_swapped_out_ is true. 560 // RenderFrameProxy exists only when is_swapped_out_ is true.
555 // TODO(nasko): This can be removed once we don't have a swapped out state on 561 // TODO(nasko): This can be removed once we don't have a swapped out state on
556 // RenderFrame. See https://crbug.com/357747. 562 // RenderFrame. See https://crbug.com/357747.
557 RenderFrameProxy* render_frame_proxy_; 563 RenderFrameProxy* render_frame_proxy_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // These manage all media players and CDMs in this render frame for 620 // These manage all media players and CDMs in this render frame for
615 // communicating with the real media player and CDM objects in the browser 621 // communicating with the real media player and CDM objects in the browser
616 // process. It's okay to use raw pointers since they are RenderFrameObservers. 622 // process. It's okay to use raw pointers since they are RenderFrameObservers.
617 RendererMediaPlayerManager* media_player_manager_; 623 RendererMediaPlayerManager* media_player_manager_;
618 RendererCdmManager* cdm_manager_; 624 RendererCdmManager* cdm_manager_;
619 #endif 625 #endif
620 626
621 // The geolocation dispatcher attached to this view, lazily initialized. 627 // The geolocation dispatcher attached to this view, lazily initialized.
622 GeolocationDispatcher* geolocation_dispatcher_; 628 GeolocationDispatcher* geolocation_dispatcher_;
623 629
630 ServiceRegistryImpl service_registry_;
631
624 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 632 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
625 633
626 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 634 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
627 }; 635 };
628 636
629 } // namespace content 637 } // namespace content
630 638
631 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 639 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698