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_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/metrics/user_metrics_action.h" | |
11 #include "components/guest_view/common/guest_view_constants.h" | 10 #include "components/guest_view/common/guest_view_constants.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" |
15 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" | 14 #include "extensions/browser/guest_view/web_view/web_view_permission_types.h" |
16 #include "ppapi/features/features.h" | 15 #include "ppapi/features/features.h" |
17 | 16 |
18 using base::UserMetricsAction; | |
19 | |
20 namespace extensions { | 17 namespace extensions { |
21 | 18 |
22 class WebViewGuest; | 19 class WebViewGuest; |
23 class WebViewPermissionHelperDelegate; | 20 class WebViewPermissionHelperDelegate; |
24 | 21 |
25 // WebViewPermissionHelper manages <webview> permission requests. This helper | 22 // WebViewPermissionHelper manages <webview> permission requests. This helper |
26 // class is owned by WebViewGuest. Its purpose is to request permission for | 23 // class is owned by WebViewGuest. Its purpose is to request permission for |
27 // various operations from the <webview> embedder, and reply back via callbacks | 24 // various operations from the <webview> embedder, and reply back via callbacks |
28 // to the callers on a response from the embedder. | 25 // to the callers on a response from the embedder. |
29 class WebViewPermissionHelper | 26 class WebViewPermissionHelper |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 WebViewGuest* const web_view_guest_; | 158 WebViewGuest* const web_view_guest_; |
162 | 159 |
163 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; | 160 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; |
164 | 161 |
165 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); | 162 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); |
166 }; | 163 }; |
167 | 164 |
168 } // namespace extensions | 165 } // namespace extensions |
169 | 166 |
170 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ | 167 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ |
OLD | NEW |