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

Side by Side Diff: content/browser/frame_host/render_frame_host_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: address comments Created 6 years, 5 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/browser/BUILD.gn ('k') | content/browser/frame_host/render_frame_host_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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/mojo/service_registry_impl.h"
17 #include "content/public/browser/render_frame_host.h" 18 #include "content/public/browser/render_frame_host.h"
18 #include "content/public/common/javascript_message_type.h" 19 #include "content/public/common/javascript_message_type.h"
19 #include "content/public/common/page_transition_types.h" 20 #include "content/public/common/page_transition_types.h"
20 #include "third_party/WebKit/public/web/WebTextDirection.h" 21 #include "third_party/WebKit/public/web/WebTextDirection.h"
21 22
22 class GURL; 23 class GURL;
23 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 24 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
24 struct FrameHostMsg_OpenURL_Params; 25 struct FrameHostMsg_OpenURL_Params;
25 struct FrameMsg_Navigate_Params; 26 struct FrameMsg_Navigate_Params;
26 27
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual const std::string& GetFrameName() OVERRIDE; 60 virtual const std::string& GetFrameName() OVERRIDE;
60 virtual bool IsCrossProcessSubframe() OVERRIDE; 61 virtual bool IsCrossProcessSubframe() OVERRIDE;
61 virtual GURL GetLastCommittedURL() OVERRIDE; 62 virtual GURL GetLastCommittedURL() OVERRIDE;
62 virtual gfx::NativeView GetNativeView() OVERRIDE; 63 virtual gfx::NativeView GetNativeView() OVERRIDE;
63 virtual void ExecuteJavaScript( 64 virtual void ExecuteJavaScript(
64 const base::string16& javascript) OVERRIDE; 65 const base::string16& javascript) OVERRIDE;
65 virtual void ExecuteJavaScript( 66 virtual void ExecuteJavaScript(
66 const base::string16& javascript, 67 const base::string16& javascript,
67 const JavaScriptResultCallback& callback) OVERRIDE; 68 const JavaScriptResultCallback& callback) OVERRIDE;
68 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; 69 virtual RenderViewHost* GetRenderViewHost() OVERRIDE;
70 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE;
69 71
70 // IPC::Sender 72 // IPC::Sender
71 virtual bool Send(IPC::Message* msg) OVERRIDE; 73 virtual bool Send(IPC::Message* msg) OVERRIDE;
72 74
73 // IPC::Listener 75 // IPC::Listener
74 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
75 77
76 void Init(); 78 void Init();
77 int routing_id() const { return routing_id_; } 79 int routing_id() const { return routing_id_; }
78 void OnCreateChildFrame(int new_routing_id, 80 void OnCreateChildFrame(int new_routing_id,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 297
296 // Map from notification_id to a callback to cancel them. 298 // Map from notification_id to a callback to cancel them.
297 std::map<int, base::Closure> cancel_notification_callbacks_; 299 std::map<int, base::Closure> cancel_notification_callbacks_;
298 300
299 int routing_id_; 301 int routing_id_;
300 bool is_swapped_out_; 302 bool is_swapped_out_;
301 303
302 // When the last BeforeUnload message was sent. 304 // When the last BeforeUnload message was sent.
303 base::TimeTicks send_before_unload_start_time_; 305 base::TimeTicks send_before_unload_start_time_;
304 306
307 ServiceRegistryImpl service_registry_;
308
305 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 309 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
306 310
307 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 311 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
308 }; 312 };
309 313
310 } // namespace content 314 } // namespace content
311 315
312 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 316 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698