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_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/common/browser_plugin_permission_type.h" | 13 #include "content/public/common/browser_plugin_permission_type.h" |
| 14 #include "content/public/common/media_stream_request.h" |
14 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
15 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
16 #include "url/gurl.h" | 17 #include "url/gurl.h" |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 | 20 |
20 struct NativeWebKeyboardEvent; | 21 struct NativeWebKeyboardEvent; |
21 | 22 |
22 // Objects implement this interface to get notified about changes in the guest | 23 // Objects implement this interface to get notified about changes in the guest |
23 // WebContents and to provide necessary functionality. | 24 // WebContents and to provide necessary functionality. |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 const base::DictionaryValue& request_info, | 94 const base::DictionaryValue& request_info, |
94 const PermissionResponseCallback& callback, | 95 const PermissionResponseCallback& callback, |
95 bool allowed_by_default); | 96 bool allowed_by_default); |
96 | 97 |
97 // Requests resolution of a potentially relative URL. | 98 // Requests resolution of a potentially relative URL. |
98 virtual GURL ResolveURL(const std::string& src); | 99 virtual GURL ResolveURL(const std::string& src); |
99 | 100 |
100 // Notifies that the content size of the guest has changed in autosize mode. | 101 // Notifies that the content size of the guest has changed in autosize mode. |
101 virtual void SizeChanged(const gfx::Size& old_size, | 102 virtual void SizeChanged(const gfx::Size& old_size, |
102 const gfx::Size& new_size) {} | 103 const gfx::Size& new_size) {} |
| 104 |
| 105 // Asks permission to use the camera and/or microphone. If permission is |
| 106 // granted, a call should be made to |callback| with the devices. If the |
| 107 // request is denied, a call should be made to |callback| with an empty list |
| 108 // of devices. |request| has the details of the request (e.g. which of audio |
| 109 // and/or video devices are requested, and lists of available devices). |
| 110 virtual void RequestMediaAccessPermission( |
| 111 const MediaStreamRequest& request, |
| 112 const MediaResponseCallback& callback); |
| 113 |
103 }; | 114 }; |
104 | 115 |
105 } // namespace content | 116 } // namespace content |
106 | 117 |
107 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ | 118 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_PLUGIN_GUEST_DELEGATE_H_ |
OLD | NEW |