| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef WebMediaDevicesRequest_h | 26 #ifndef WebMediaDevicesRequest_h |
| 27 #define WebMediaDevicesRequest_h | 27 #define WebMediaDevicesRequest_h |
| 28 | 28 |
| 29 #include "WebSecurityOrigin.h" | 29 #include "WebSecurityOrigin.h" |
| 30 #include "public/platform/WebCommon.h" | 30 #include "public/platform/WebCommon.h" |
| 31 #include "public/platform/WebPrivatePtr.h" | 31 #include "public/platform/WebPrivatePtr.h" |
| 32 #include "public/platform/WebString.h" | 32 #include "public/platform/WebString.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 |
| 35 class MediaDevicesRequest; | 36 class MediaDevicesRequest; |
| 36 } | |
| 37 | |
| 38 namespace blink { | |
| 39 class WebDocument; | 37 class WebDocument; |
| 40 class WebMediaDeviceInfo; | 38 class WebMediaDeviceInfo; |
| 41 template <typename T> class WebVector; | 39 template <typename T> class WebVector; |
| 42 | 40 |
| 43 class WebMediaDevicesRequest { | 41 class WebMediaDevicesRequest { |
| 44 public: | 42 public: |
| 45 WebMediaDevicesRequest() { } | 43 WebMediaDevicesRequest() { } |
| 46 WebMediaDevicesRequest(const WebMediaDevicesRequest& request) { assign(reque
st); } | 44 WebMediaDevicesRequest(const WebMediaDevicesRequest& request) { assign(reque
st); } |
| 47 ~WebMediaDevicesRequest() { reset(); } | 45 ~WebMediaDevicesRequest() { reset(); } |
| 48 | 46 |
| 49 WebMediaDevicesRequest& operator=(const WebMediaDevicesRequest& other) | 47 WebMediaDevicesRequest& operator=(const WebMediaDevicesRequest& other) |
| 50 { | 48 { |
| 51 assign(other); | 49 assign(other); |
| 52 return *this; | 50 return *this; |
| 53 } | 51 } |
| 54 | 52 |
| 55 BLINK_EXPORT void reset(); | 53 BLINK_EXPORT void reset(); |
| 56 bool isNull() const { return m_private.isNull(); } | 54 bool isNull() const { return m_private.isNull(); } |
| 57 BLINK_EXPORT bool equals(const WebMediaDevicesRequest&) const; | 55 BLINK_EXPORT bool equals(const WebMediaDevicesRequest&) const; |
| 58 BLINK_EXPORT void assign(const WebMediaDevicesRequest&); | 56 BLINK_EXPORT void assign(const WebMediaDevicesRequest&); |
| 59 | 57 |
| 60 BLINK_EXPORT WebSecurityOrigin securityOrigin() const; | 58 BLINK_EXPORT WebSecurityOrigin securityOrigin() const; |
| 61 BLINK_EXPORT WebDocument ownerDocument() const; | 59 BLINK_EXPORT WebDocument ownerDocument() const; |
| 62 | 60 |
| 63 BLINK_EXPORT void requestSucceeded(WebVector<WebMediaDeviceInfo>); | 61 BLINK_EXPORT void requestSucceeded(WebVector<WebMediaDeviceInfo>); |
| 64 | 62 |
| 65 #if BLINK_IMPLEMENTATION | 63 #if BLINK_IMPLEMENTATION |
| 66 WebMediaDevicesRequest(blink::MediaDevicesRequest*); | 64 WebMediaDevicesRequest(MediaDevicesRequest*); |
| 67 operator blink::MediaDevicesRequest*() const; | 65 operator MediaDevicesRequest*() const; |
| 68 #endif | 66 #endif |
| 69 | 67 |
| 70 private: | 68 private: |
| 71 WebPrivatePtr<blink::MediaDevicesRequest> m_private; | 69 WebPrivatePtr<MediaDevicesRequest> m_private; |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 inline bool operator==(const WebMediaDevicesRequest& a, const WebMediaDevicesReq
uest& b) | 72 inline bool operator==(const WebMediaDevicesRequest& a, const WebMediaDevicesReq
uest& b) |
| 75 { | 73 { |
| 76 return a.equals(b); | 74 return a.equals(b); |
| 77 } | 75 } |
| 78 | 76 |
| 79 } // namespace blink | 77 } // namespace blink |
| 80 | 78 |
| 81 #endif // WebMediaDevicesRequest_h | 79 #endif // WebMediaDevicesRequest_h |
| OLD | NEW |