Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: chrome/browser/media/webrtc/media_stream_device_permission_context.h

Issue 2966963003: Ensure media permission requests are correctly cancelled when permission prompts are ignored (Closed)
Patch Set: Ensure media permission requests are correctly cancelled when permission prompts are ignored Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/permissions/permission_context_base.h" 9 #include "chrome/browser/permissions/permission_context_base.h"
10 #include "components/content_settings/core/common/content_settings_types.h" 10 #include "components/content_settings/core/common/content_settings_types.h"
(...skipping 16 matching lines...) Expand all
27 // TODO(xhwang): GURL.GetOrigin() shouldn't be used as the origin. Need to 27 // TODO(xhwang): GURL.GetOrigin() shouldn't be used as the origin. Need to
28 // refactor to use url::Origin. crbug.com/527149 is filed for this. 28 // refactor to use url::Origin. crbug.com/527149 is filed for this.
29 ContentSetting GetPermissionStatusInternal( 29 ContentSetting GetPermissionStatusInternal(
30 content::RenderFrameHost* render_frame_host, 30 content::RenderFrameHost* render_frame_host,
31 const GURL& requesting_origin, 31 const GURL& requesting_origin,
32 const GURL& embedding_origin) const override; 32 const GURL& embedding_origin) const override;
33 33
34 void ResetPermission(const GURL& requesting_origin, 34 void ResetPermission(const GURL& requesting_origin,
35 const GURL& embedding_origin) override; 35 const GURL& embedding_origin) override;
36 36
37 void CancelPermissionRequest(content::WebContents* web_contents,
38 const PermissionRequestID& id) override;
39
40 private: 37 private:
41 // PermissionContextBase: 38 // PermissionContextBase:
42 bool IsRestrictedToSecureOrigins() const override; 39 bool IsRestrictedToSecureOrigins() const override;
43 40
44 ContentSettingsType content_settings_type_; 41 ContentSettingsType content_settings_type_;
45 42
46 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicePermissionContext); 43 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicePermissionContext);
47 }; 44 };
48 45
49 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_ 46 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICE_PERMISSION_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698