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

Side by Side Diff: Source/modules/mediastream/NavigatorUserMediaError.h

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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
25 #ifndef NavigatorUserMediaError_h 25 #ifndef NavigatorUserMediaError_h
26 #define NavigatorUserMediaError_h 26 #define NavigatorUserMediaError_h
27 27
28 #include "bindings/v8/ScriptWrappable.h" 28 #include "bindings/v8/ScriptWrappable.h"
29 #include "wtf/PassRefPtr.h" 29 #include "wtf/PassRefPtr.h"
30 #include "wtf/RefCounted.h" 30 #include "wtf/RefCounted.h"
31 #include "wtf/text/WTFString.h" 31 #include "wtf/text/WTFString.h"
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 class NavigatorUserMediaError FINAL : public RefCounted<NavigatorUserMediaError> , public ScriptWrappable { 35 class NavigatorUserMediaError FINAL : public RefCountedWillBeGarbageCollectedFin alized<NavigatorUserMediaError>, public ScriptWrappable {
36 public: 36 public:
37 enum Name { 37 enum Name {
38 NamePermissionDenied, 38 NamePermissionDenied,
39 NameConstraintNotSatisfied 39 NameConstraintNotSatisfied
40 }; 40 };
41 41
42 static PassRefPtr<NavigatorUserMediaError> create(Name, const String& messag e, const String& constraintName); 42 static PassRefPtrWillBeRawPtr<NavigatorUserMediaError> create(Name, const St ring& message, const String& constraintName);
43 43
44 static PassRefPtr<NavigatorUserMediaError> create(const String& name, const String& message, const String& constraintName) 44 static PassRefPtrWillBeRawPtr<NavigatorUserMediaError> create(const String& name, const String& message, const String& constraintName)
45 { 45 {
46 return adoptRef(new NavigatorUserMediaError(name, message, constraintNam e)); 46 return adoptRefWillBeNoop(new NavigatorUserMediaError(name, message, con straintName));
47 } 47 }
48 48
49 String name() const { return m_name; } 49 String name() const { return m_name; }
50 const String& message() const { return m_message; } 50 const String& message() const { return m_message; }
51 const String& constraintName() const { return m_constraintName; } 51 const String& constraintName() const { return m_constraintName; }
52 52
53 void trace(Visitor*) { }
54
53 private: 55 private:
54 NavigatorUserMediaError(const String& name, const String& message, const Str ing& constraintName) 56 NavigatorUserMediaError(const String& name, const String& message, const Str ing& constraintName)
55 : m_name(name), m_message(message), m_constraintName(constraintName) 57 : m_name(name), m_message(message), m_constraintName(constraintName)
56 { 58 {
57 ASSERT(!name.isEmpty()); 59 ASSERT(!name.isEmpty());
58 ScriptWrappable::init(this); 60 ScriptWrappable::init(this);
59 } 61 }
60 62
61 String m_name; 63 String m_name;
62 String m_message; 64 String m_message;
63 String m_constraintName; 65 String m_constraintName;
64 }; 66 };
65 67
66 } // namespace WebCore 68 } // namespace WebCore
67 69
68 #endif // NavigatorUserMediaError_h 70 #endif // NavigatorUserMediaError_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/NavigatorMediaStream.cpp ('k') | Source/modules/mediastream/NavigatorUserMediaError.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698