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