Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ | |
| 7 | |
| 8 #include "chrome/browser/permissions/permission_context_base.h" | |
| 9 #include "components/content_settings/core/common/content_settings_types.h" | |
| 10 | |
| 11 // Common class which handles the mic and camera permissions. | |
| 12 // MediaStreamMicPermissionContextFactory and | |
| 13 // MediaStreamCameraPermissionContextFactory will instantiate this with | |
| 14 // corresponding |permission_type|. | |
| 15 class MediaStreamDevicePermissionContext : public PermissionContextBase { | |
| 16 public: | |
| 17 MediaStreamDevicePermissionContext(Profile* profile, | |
| 18 const ContentSettingsType permission_type); | |
| 19 ~MediaStreamDevicePermissionContext() override; | |
| 20 | |
|
xhwang
2015/08/27 19:25:17
nit:
// PermissionContextBase:
guoweis_left_chromium
2015/08/27 23:18:35
Done.
| |
| 21 void RequestPermission(content::WebContents* web_contents, | |
| 22 const PermissionRequestID& id, | |
| 23 const GURL& requesting_frame, | |
| 24 bool user_gesture, | |
| 25 const BrowserPermissionCallback& callback) override; | |
| 26 | |
| 27 ContentSetting GetPermissionStatus( | |
| 28 const GURL& requesting_origin, | |
| 29 const GURL& embedding_origin) const override; | |
| 30 | |
| 31 void ResetPermission(const GURL& requesting_origin, | |
| 32 const GURL& embedding_origin) override; | |
| 33 | |
| 34 void CancelPermissionRequest(content::WebContents* web_contents, | |
| 35 const PermissionRequestID& id) override; | |
| 36 | |
| 37 private: | |
| 38 // PermissionContextBase: | |
| 39 bool IsRestrictedToSecureOrigins() const override; | |
| 40 | |
| 41 ContentSettingsType permission_type_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicePermissionContext); | |
|
raymes
2015/08/27 05:54:18
include base/macros.h
guoweis_left_chromium
2015/08/27 23:18:35
Done.
| |
| 44 }; | |
| 45 | |
| 46 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ | |
| OLD | NEW |