[AndroidWebViewShell] Replace rebaseline script with a new version using test_runner.py
[chromium-blink-merge.git] / media / filters / default_media_permission.h
blob9ad295a9c05c9f57491ba94616053716e9aa3338
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.
5 #ifndef MEDIA_FILTERS_DEFAULT_MEDIA_PERMISSION_H_
6 #define MEDIA_FILTERS_DEFAULT_MEDIA_PERMISSION_H_
8 #include "media/base/media_export.h"
9 #include "media/base/media_permission.h"
11 namespace media {
13 // Default MediaPermission implementation that will always allow or deny the
14 // permission request/check based on |allow|.
15 // WARNING: This class allows or denies permission request/check without real
16 // user's consent. It should NOT be used in a real user facing product.
17 class MEDIA_EXPORT DefaultMediaPermission : public MediaPermission {
18 public:
19 explicit DefaultMediaPermission(bool allow);
20 ~DefaultMediaPermission() override;
22 // media::MediaPermission implementation.
23 void HasPermission(Type type,
24 const GURL& security_origin,
25 const PermissionStatusCB& permission_status_cb) override;
26 void RequestPermission(
27 Type type,
28 const GURL& security_origin,
29 const PermissionStatusCB& permission_status_cb) override;
31 private:
32 const bool allow_;
34 DISALLOW_COPY_AND_ASSIGN(DefaultMediaPermission);
37 } // namespace media
39 #endif // MEDIA_FILTERS_DEFAULT_MEDIA_PERMISSION_H_