OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/public/common/media_stream_request.h" | 10 #include "content/public/common/media_stream_request.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder | 40 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder |
41 // does not support JavaScript dialogs. | 41 // does not support JavaScript dialogs. |
42 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; | 42 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; |
43 | 43 |
44 // Creates a new tab or popup window with |web_contents|. The embedder may | 44 // Creates a new tab or popup window with |web_contents|. The embedder may |
45 // choose to do nothing if tabs and popups are not supported. | 45 // choose to do nothing if tabs and popups are not supported. |
46 virtual void CreateTab(content::WebContents* web_contents, | 46 virtual void CreateTab(content::WebContents* web_contents, |
47 const std::string& extension_id, | 47 const std::string& extension_id, |
48 WindowOpenDisposition disposition, | 48 WindowOpenDisposition disposition, |
49 const gfx::Rect& initial_pos, | 49 const gfx::Rect& initial_rect, |
50 bool user_gesture) = 0; | 50 bool user_gesture) = 0; |
51 | 51 |
52 // Requests access to an audio or video media stream. Invokes |callback| | 52 // Requests access to an audio or video media stream. Invokes |callback| |
53 // with the response. | 53 // with the response. |
54 virtual void ProcessMediaAccessRequest( | 54 virtual void ProcessMediaAccessRequest( |
55 content::WebContents* web_contents, | 55 content::WebContents* web_contents, |
56 const content::MediaStreamRequest& request, | 56 const content::MediaStreamRequest& request, |
57 const content::MediaResponseCallback& callback, | 57 const content::MediaResponseCallback& callback, |
58 const Extension* extension) = 0; | 58 const Extension* extension) = 0; |
59 | 59 |
60 // Checks if we have permission to access the microphone or camera. Note that | 60 // Checks if we have permission to access the microphone or camera. Note that |
61 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE | 61 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE |
62 // or MEDIA_DEVICE_VIDEO_CAPTURE. | 62 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
63 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, | 63 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, |
64 const GURL& security_origin, | 64 const GURL& security_origin, |
65 content::MediaStreamType type, | 65 content::MediaStreamType type, |
66 const Extension* extension) = 0; | 66 const Extension* extension) = 0; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace extensions | 69 } // namespace extensions |
70 | 70 |
71 #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ | 71 #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ |
OLD | NEW |