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

Unified Diff: public/web/WebMIDIPermissionRequest.h

Issue 18563008: Web MIDI: add assign() and equals() to WebMIDIPermissionRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: for CQ Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebSpeechRecognitionHandle.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebMIDIPermissionRequest.h
diff --git a/public/web/WebMIDIPermissionRequest.h b/public/web/WebMIDIPermissionRequest.h
index c6c2d9d4f31501fecb454e2593112a44644770a9..e451cd624e1993b0748a58c424902fb51b8db348 100644
--- a/public/web/WebMIDIPermissionRequest.h
+++ b/public/web/WebMIDIPermissionRequest.h
@@ -49,9 +49,14 @@ class WebSecurityOrigin;
// WebMIDIClient::cancelPermissionRequest (request canceled).
class WebMIDIPermissionRequest {
public:
+ WebMIDIPermissionRequest(const WebMIDIPermissionRequest& o) { assign(o); }
+
WEBKIT_EXPORT WebSecurityOrigin securityOrigin() const;
WEBKIT_EXPORT void setIsAllowed(bool);
+ WEBKIT_EXPORT void assign(const WebMIDIPermissionRequest&);
+ WEBKIT_EXPORT bool equals(const WebMIDIPermissionRequest&) const;
+
#if WEBKIT_IMPLEMENTATION
explicit WebMIDIPermissionRequest(const PassRefPtr<WebCore::MIDIAccess>&);
explicit WebMIDIPermissionRequest(WebCore::MIDIAccess*);
@@ -61,6 +66,16 @@ private:
WebPrivatePtr<WebCore::MIDIAccess> m_private;
};
+inline bool operator==(const WebMIDIPermissionRequest& a, const WebMIDIPermissionRequest& b)
+{
+ return a.equals(b);
+}
+
+inline bool operator!=(const WebMIDIPermissionRequest& a, const WebMIDIPermissionRequest& b)
+{
+ return !(a == b);
+}
+
} // namespace WebKit
#endif // WebMIDIPermissionRequest_h
« no previous file with comments | « Source/web/WebSpeechRecognitionHandle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698