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

Side by Side Diff: content/public/browser/render_frame_host.h

Issue 130773004: Start moving context menu code to RenderFrame. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
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_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "ipc/ipc_listener.h" 9 #include "ipc/ipc_listener.h"
10 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
11 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
12 12
13 namespace content { 13 namespace content {
14 class RenderProcessHost; 14 class RenderProcessHost;
15 class RenderViewHost; 15 class RenderViewHost;
16 class SiteInstance; 16 class SiteInstance;
17 struct CustomContextMenuContext;
17 18
18 // The interface provides a communication conduit with a frame in the renderer. 19 // The interface provides a communication conduit with a frame in the renderer.
19 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, 20 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener,
20 public IPC::Sender { 21 public IPC::Sender {
21 public: 22 public:
22 // Returns the RenderFrameHost given its ID and the ID of its render process. 23 // Returns the RenderFrameHost given its ID and the ID of its render process.
23 // Returns NULL if the IDs do not correspond to a live RenderFrameHost. 24 // Returns NULL if the IDs do not correspond to a live RenderFrameHost.
24 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); 25 static RenderFrameHost* FromID(int render_process_id, int render_frame_id);
25 26
26 virtual ~RenderFrameHost() {} 27 virtual ~RenderFrameHost() {}
27 28
28 virtual SiteInstance* GetSiteInstance() = 0; 29 virtual SiteInstance* GetSiteInstance() = 0;
29 30
30 // Returns the process for this frame. 31 // Returns the process for this frame.
31 virtual RenderProcessHost* GetProcess() = 0; 32 virtual RenderProcessHost* GetProcess() = 0;
32 33
33 // Returns the route id for this frame. 34 // Returns the route id for this frame.
34 virtual int GetRoutingID() = 0; 35 virtual int GetRoutingID() = 0;
35 36
36 // Returns the associated widget's native view. 37 // Returns the associated widget's native view.
37 virtual gfx::NativeView GetNativeView() = 0; 38 virtual gfx::NativeView GetNativeView() = 0;
38 39
40 // Let the renderer know that the menu has been closed.
41 virtual void NotifyContextMenuClosed(
42 const CustomContextMenuContext& context) = 0;
43
44 // Executes custom context menu action that was provided from WebKit.
nasko 2014/01/31 00:38:17 nit: Blink?
jam 2014/01/31 00:45:53 Done.
45 virtual void ExecuteCustomContextMenuCommand(
46 int action, const CustomContextMenuContext& context) = 0;
47
39 // Temporary until we get rid of RenderViewHost. 48 // Temporary until we get rid of RenderViewHost.
40 virtual RenderViewHost* GetRenderViewHost() = 0; 49 virtual RenderViewHost* GetRenderViewHost() = 0;
41 50
42 private: 51 private:
43 // This interface should only be implemented inside content. 52 // This interface should only be implemented inside content.
44 friend class RenderFrameHostImpl; 53 friend class RenderFrameHostImpl;
45 RenderFrameHost() {} 54 RenderFrameHost() {}
46 }; 55 };
47 56
48 } // namespace content 57 } // namespace content
49 58
50 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ 59 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698