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> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // not a WebContents, returns NULL. | 123 // not a WebContents, returns NULL. |
124 virtual WebContents* GetAsWebContents(); | 124 virtual WebContents* GetAsWebContents(); |
125 | 125 |
126 // The render frame has requested access to media devices listed in | 126 // The render frame has requested access to media devices listed in |
127 // |request|, and the client should grant or deny that permission by | 127 // |request|, and the client should grant or deny that permission by |
128 // calling |callback|. | 128 // calling |callback|. |
129 virtual void RequestMediaAccessPermission( | 129 virtual void RequestMediaAccessPermission( |
130 const MediaStreamRequest& request, | 130 const MediaStreamRequest& request, |
131 const MediaResponseCallback& callback); | 131 const MediaResponseCallback& callback); |
132 | 132 |
| 133 // Checks if we have permission to access the microphone or camera. Note that |
| 134 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE |
| 135 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 136 virtual bool CheckMediaAccessPermission(const GURL& security_origin, |
| 137 MediaStreamType type); |
| 138 |
133 // Get the accessibility mode for the WebContents that owns this frame. | 139 // Get the accessibility mode for the WebContents that owns this frame. |
134 virtual AccessibilityMode GetAccessibilityMode() const; | 140 virtual AccessibilityMode GetAccessibilityMode() const; |
135 | 141 |
136 // Invoked when an accessibility event is received from the renderer. | 142 // Invoked when an accessibility event is received from the renderer. |
137 virtual void AccessibilityEventReceived( | 143 virtual void AccessibilityEventReceived( |
138 const std::vector<AXEventNotificationDetails>& details) {} | 144 const std::vector<AXEventNotificationDetails>& details) {} |
139 | 145 |
140 // Find a guest RenderFrameHost by its browser plugin instance id. | 146 // Find a guest RenderFrameHost by its browser plugin instance id. |
141 virtual RenderFrameHost* GetGuestByInstanceID( | 147 virtual RenderFrameHost* GetGuestByInstanceID( |
142 int browser_plugin_instance_id); | 148 int browser_plugin_instance_id); |
143 | 149 |
144 #if defined(OS_WIN) | 150 #if defined(OS_WIN) |
145 // Returns the frame's parent's NativeViewAccessible. | 151 // Returns the frame's parent's NativeViewAccessible. |
146 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 152 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
147 #endif | 153 #endif |
148 | 154 |
149 protected: | 155 protected: |
150 virtual ~RenderFrameHostDelegate() {} | 156 virtual ~RenderFrameHostDelegate() {} |
151 }; | 157 }; |
152 | 158 |
153 } // namespace content | 159 } // namespace content |
154 | 160 |
155 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 161 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
OLD | NEW |