OLD | NEW |
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_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | |
9 | |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
12 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
13 #include "content/common/frame_message_enums.h" | |
14 #include "content/public/common/javascript_message_type.h" | 11 #include "content/public/common/javascript_message_type.h" |
15 #include "content/public/common/media_stream_request.h" | 12 #include "content/public/common/media_stream_request.h" |
16 | 13 |
17 #if defined(OS_WIN) | |
18 #include "ui/gfx/native_widget_types.h" | |
19 #endif | |
20 | |
21 class GURL; | 14 class GURL; |
22 | 15 |
23 namespace IPC { | 16 namespace IPC { |
24 class Message; | 17 class Message; |
25 } | 18 } |
26 | 19 |
27 namespace content { | 20 namespace content { |
28 class RenderFrameHost; | 21 class RenderFrameHost; |
29 class WebContents; | 22 class WebContents; |
30 struct AXEventNotificationDetails; | |
31 struct ContextMenuParams; | 23 struct ContextMenuParams; |
32 | 24 |
33 // An interface implemented by an object interested in knowing about the state | 25 // An interface implemented by an object interested in knowing about the state |
34 // of the RenderFrameHost. | 26 // of the RenderFrameHost. |
35 class CONTENT_EXPORT RenderFrameHostDelegate { | 27 class CONTENT_EXPORT RenderFrameHostDelegate { |
36 public: | 28 public: |
37 // This is used to give the delegate a chance to filter IPC messages. | 29 // This is used to give the delegate a chance to filter IPC messages. |
38 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, | 30 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, |
39 const IPC::Message& message); | 31 const IPC::Message& message); |
40 | 32 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // not a WebContents, returns NULL. | 112 // not a WebContents, returns NULL. |
121 virtual WebContents* GetAsWebContents(); | 113 virtual WebContents* GetAsWebContents(); |
122 | 114 |
123 // The render frame has requested access to media devices listed in | 115 // The render frame has requested access to media devices listed in |
124 // |request|, and the client should grant or deny that permission by | 116 // |request|, and the client should grant or deny that permission by |
125 // calling |callback|. | 117 // calling |callback|. |
126 virtual void RequestMediaAccessPermission( | 118 virtual void RequestMediaAccessPermission( |
127 const MediaStreamRequest& request, | 119 const MediaStreamRequest& request, |
128 const MediaResponseCallback& callback); | 120 const MediaResponseCallback& callback); |
129 | 121 |
130 // Get the accessibility mode for the WebContents that owns this frame. | |
131 virtual AccessibilityMode GetAccessibilityMode() const; | |
132 | |
133 // Invoked when an accessibility event is received from the renderer. | |
134 virtual void AccessibilityEventReceived( | |
135 const std::vector<AXEventNotificationDetails>& details) {} | |
136 | |
137 #if defined(OS_WIN) | |
138 // Returns the frame's parent's NativeViewAccessible. | |
139 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | |
140 #endif | |
141 | |
142 protected: | 122 protected: |
143 virtual ~RenderFrameHostDelegate() {} | 123 virtual ~RenderFrameHostDelegate() {} |
144 }; | 124 }; |
145 | 125 |
146 } // namespace content | 126 } // namespace content |
147 | 127 |
148 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 128 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
OLD | NEW |