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 CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/metrics/user_metrics_action.h" | 9 #include "base/metrics/user_metrics_action.h" |
10 #include "chrome/browser/guest_view/guest_view_constants.h" | |
11 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h" | 10 #include "chrome/browser/guest_view/web_view/web_view_permission_types.h" |
12 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
13 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
14 #include "content/public/common/media_stream_request.h" | 13 #include "content/public/common/media_stream_request.h" |
| 14 #include "extensions/browser/guest_view/guest_view_constants.h" |
15 | 15 |
16 using base::UserMetricsAction; | 16 using base::UserMetricsAction; |
17 | 17 |
18 class WebViewGuest; | 18 class WebViewGuest; |
19 | 19 |
20 // WebViewPermissionHelper manages <webview> permission requests. This helper | 20 // WebViewPermissionHelper manages <webview> permission requests. This helper |
21 // class is owned by WebViewGuest. Its purpose is to request permission for | 21 // class is owned by WebViewGuest. Its purpose is to request permission for |
22 // various operations from the <webview> embedder, and reply back via callbacks | 22 // various operations from the <webview> embedder, and reply back via callbacks |
23 // to the callers on a response from the embedder. | 23 // to the callers on a response from the embedder. |
24 class WebViewPermissionHelper | 24 class WebViewPermissionHelper |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 std::map<int, int> bridge_id_to_request_id_map_; | 205 std::map<int, int> bridge_id_to_request_id_map_; |
206 | 206 |
207 WebViewGuest* web_view_guest_; | 207 WebViewGuest* web_view_guest_; |
208 | 208 |
209 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; | 209 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); | 211 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); |
212 }; | 212 }; |
213 | 213 |
214 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 214 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
OLD | NEW |