| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 virtual void UpdateEncoding(RenderFrameHost* render_frame_host, | 119 virtual void UpdateEncoding(RenderFrameHost* render_frame_host, |
| 120 const std::string& encoding) {} | 120 const std::string& encoding) {} |
| 121 | 121 |
| 122 // Return this object cast to a WebContents, if it is one. If the object is | 122 // Return this object cast to a WebContents, if it is one. If the object is |
| 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 // Delegates that expect this to be ever called, must implement the function. |
| 129 virtual void RequestMediaAccessPermission( | 130 virtual void RequestMediaAccessPermission( |
| 130 const MediaStreamRequest& request, | 131 const MediaStreamRequest& request, |
| 131 const MediaResponseCallback& callback); | 132 const MediaResponseCallback& callback); |
| 132 | 133 |
| 133 // Checks if we have permission to access the microphone or camera. Note that | 134 // 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 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE |
| 135 // or MEDIA_DEVICE_VIDEO_CAPTURE. | 136 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 137 // Delegates that expect this to be ever called, must implement the function. |
| 136 virtual bool CheckMediaAccessPermission(const GURL& security_origin, | 138 virtual bool CheckMediaAccessPermission(const GURL& security_origin, |
| 137 MediaStreamType type); | 139 MediaStreamType type); |
| 138 | 140 |
| 139 // Get the accessibility mode for the WebContents that owns this frame. | 141 // Get the accessibility mode for the WebContents that owns this frame. |
| 140 virtual AccessibilityMode GetAccessibilityMode() const; | 142 virtual AccessibilityMode GetAccessibilityMode() const; |
| 141 | 143 |
| 142 // Invoked when an accessibility event is received from the renderer. | 144 // Invoked when an accessibility event is received from the renderer. |
| 143 virtual void AccessibilityEventReceived( | 145 virtual void AccessibilityEventReceived( |
| 144 const std::vector<AXEventNotificationDetails>& details) {} | 146 const std::vector<AXEventNotificationDetails>& details) {} |
| 145 | 147 |
| 146 // Find a guest RenderFrameHost by its browser plugin instance id. | 148 // Find a guest RenderFrameHost by its browser plugin instance id. |
| 147 virtual RenderFrameHost* GetGuestByInstanceID( | 149 virtual RenderFrameHost* GetGuestByInstanceID( |
| 148 int browser_plugin_instance_id); | 150 int browser_plugin_instance_id); |
| 149 | 151 |
| 150 #if defined(OS_WIN) | 152 #if defined(OS_WIN) |
| 151 // Returns the frame's parent's NativeViewAccessible. | 153 // Returns the frame's parent's NativeViewAccessible. |
| 152 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 154 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
| 153 #endif | 155 #endif |
| 154 | 156 |
| 155 protected: | 157 protected: |
| 156 virtual ~RenderFrameHostDelegate() {} | 158 virtual ~RenderFrameHostDelegate() {} |
| 157 }; | 159 }; |
| 158 | 160 |
| 159 } // namespace content | 161 } // namespace content |
| 160 | 162 |
| 161 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 163 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
| OLD | NEW |