diff --git a/talk/base/move.h b/talk/base/move.h index 0cd1dcfae1..a04b7c897a 100644 --- a/talk/base/move.h +++ b/talk/base/move.h @@ -26,7 +26,7 @@ // // template // class scoped_ptr { -// MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) +// TALK_MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) // public: // scoped_ptr(RValue& other) : ptr_(other.release()) { } // scoped_ptr& operator=(RValue& other) { @@ -88,7 +88,7 @@ // Here's an example with comments explaining what gets triggered where: // // class Foo { -// MOVE_ONLY_TYPE_FOR_CPP_03(Foo, RValue); +// TALK_MOVE_ONLY_TYPE_FOR_CPP_03(Foo, RValue); // // public: // ... API ... @@ -191,7 +191,7 @@ // // The workaround is to explicitly declare your copy constructor. // -#define MOVE_ONLY_TYPE_FOR_CPP_03(type, rvalue_type) \ +#define TALK_MOVE_ONLY_TYPE_FOR_CPP_03(type, rvalue_type) \ private: \ struct rvalue_type { \ explicit rvalue_type(type* object) : object(object) {} \ diff --git a/talk/base/scoped_ptr.h b/talk/base/scoped_ptr.h index c12948b4cc..90f743c628 100644 --- a/talk/base/scoped_ptr.h +++ b/talk/base/scoped_ptr.h @@ -95,7 +95,7 @@ #include "talk/base/common.h" // for ASSERT #include "talk/base/compile_assert.h" // for COMPILE_ASSERT -#include "talk/base/move.h" // for MOVE_ONLY_TYPE_FOR_CPP_03 +#include "talk/base/move.h" // for TALK_MOVE_ONLY_TYPE_FOR_CPP_03 #include "talk/base/template_util.h" // for is_convertible, is_array #ifdef _WIN32 @@ -304,7 +304,7 @@ class scoped_ptr_impl { // types. template > class scoped_ptr { - MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) + TALK_MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) public: // The element and deleter types. @@ -449,7 +449,7 @@ class scoped_ptr { template class scoped_ptr { - MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) + TALK_MOVE_ONLY_TYPE_FOR_CPP_03(scoped_ptr, RValue) public: // The element and deleter types. @@ -587,12 +587,4 @@ bool operator!=(T* p1, const talk_base::scoped_ptr& p2) { return p1 != p2.get(); } -// A function to convert T* into talk_base::scoped_ptr -// Doing e.g. make_scoped_ptr(new FooBarBaz(arg)) is a shorter notation -// for talk_base::scoped_ptr >(new FooBarBaz(arg)) -template -talk_base::scoped_ptr make_scoped_ptr(T* ptr) { - return talk_base::scoped_ptr(ptr); -} - #endif // #ifndef TALK_BASE_SCOPED_PTR_H__ diff --git a/talk/media/base/capturemanager.h b/talk/media/base/capturemanager.h index 9c443950af..5226e7b470 100644 --- a/talk/media/base/capturemanager.h +++ b/talk/media/base/capturemanager.h @@ -67,19 +67,19 @@ class CaptureManager : public sigslot::has_slots<> { CaptureManager() {} virtual ~CaptureManager(); - bool StartVideoCapture(VideoCapturer* video_capturer, - const VideoFormat& desired_format); - bool StopVideoCapture(VideoCapturer* video_capturer, - const VideoFormat& format); + virtual bool StartVideoCapture(VideoCapturer* video_capturer, + const VideoFormat& desired_format); + virtual bool StopVideoCapture(VideoCapturer* video_capturer, + const VideoFormat& format); // Possibly restarts the capturer. If |options| is set to kRequestRestart, // the CaptureManager chooses whether this request can be handled with the // current state or if a restart is actually needed. If |options| is set to // kForceRestart, the capturer is restarted. - bool RestartVideoCapture(VideoCapturer* video_capturer, - const VideoFormat& previous_format, - const VideoFormat& desired_format, - RestartOptions options); + virtual bool RestartVideoCapture(VideoCapturer* video_capturer, + const VideoFormat& previous_format, + const VideoFormat& desired_format, + RestartOptions options); virtual bool AddVideoRenderer(VideoCapturer* video_capturer, VideoRenderer* video_renderer);