Commit 562aba59 authored by dcheng's avatar dcheng Committed by Commit bot

Standardize usage of virtual/override/final in remoting/

This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.

BUG=417463
TBR=jamiewalch@chromium.org

Review URL: https://codereview.chromium.org/667123002

Cr-Commit-Position: refs/heads/master@{#300472}
parent c2456547
......@@ -55,7 +55,7 @@ class AutoThread : base::PlatformThread::Delegate {
explicit AutoThread(const char* name);
// Waits for the thread to exit, and then destroys it.
virtual ~AutoThread();
~AutoThread() override;
// Starts the thread, running the specified type of MessageLoop. Returns
// an AutoThreadTaskRunner through which tasks may be posted to the thread
......@@ -83,7 +83,7 @@ class AutoThread : base::PlatformThread::Delegate {
void JoinAndDeleteThread();
// base::PlatformThread::Delegate methods:
virtual void ThreadMain() override;
void ThreadMain() override;
// Used to pass data to ThreadMain.
struct StartupData;
......
......@@ -25,18 +25,16 @@ class AutoThreadTaskRunner : public base::SingleThreadTaskRunner {
const base::Closure& stop_task);
// SingleThreadTaskRunner implementation
virtual bool PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
virtual bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
virtual bool RunsTasksOnCurrentThread() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
private:
virtual ~AutoThreadTaskRunner();
~AutoThreadTaskRunner() override;
// Task posted to |task_runner_| to notify the caller that it may be stopped.
base::Closure stop_task_;
......
......@@ -103,15 +103,15 @@ class CompoundBufferInputStream
public:
// Caller keeps ownership of |buffer|. |buffer| must be locked.
explicit CompoundBufferInputStream(const CompoundBuffer* buffer);
virtual ~CompoundBufferInputStream();
~CompoundBufferInputStream() override;
int position() const { return position_; }
// google::protobuf::io::ZeroCopyInputStream interface.
virtual bool Next(const void** data, int* size) override;
virtual void BackUp(int count) override;
virtual bool Skip(int count) override;
virtual int64 ByteCount() const override;
bool Next(const void** data, int* size) override;
void BackUp(int count) override;
bool Skip(int count) override;
int64 ByteCount() const override;
private:
const CompoundBuffer* buffer_;
......
......@@ -46,18 +46,16 @@ class PluginThreadTaskRunner : public base::SingleThreadTaskRunner {
void Quit();
// base::SingleThreadTaskRunner interface.
virtual bool PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
virtual bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
virtual bool RunsTasksOnCurrentThread() const override;
bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
protected:
virtual ~PluginThreadTaskRunner();
~PluginThreadTaskRunner() override;
private:
// Methods that can be called from any thread.
......
......@@ -26,12 +26,12 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner);
// Overridden from net::URLRequestContextGetter:
virtual net::URLRequestContext* GetURLRequestContext() override;
virtual scoped_refptr<base::SingleThreadTaskRunner>
GetNetworkTaskRunner() const override;
net::URLRequestContext* GetURLRequestContext() override;
scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
const override;
protected:
virtual ~URLRequestContextGetter();
~URLRequestContextGetter() override;
private:
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
......
......@@ -16,10 +16,10 @@ namespace remoting {
class VlogNetLog::Observer : public net::NetLog::ThreadSafeObserver {
public:
Observer();
virtual ~Observer();
~Observer() override;
// NetLog::ThreadSafeObserver overrides:
virtual void OnAddEntry(const net::NetLog::Entry& entry) override;
void OnAddEntry(const net::NetLog::Entry& entry) override;
private:
DISALLOW_COPY_AND_ASSIGN(Observer);
......
......@@ -17,7 +17,7 @@ namespace remoting {
class VlogNetLog : public net::NetLog {
public:
VlogNetLog();
virtual ~VlogNetLog();
~VlogNetLog() override;
private:
class Observer;
......
......@@ -29,14 +29,14 @@ class AudioDecodeScheduler : public protocol::AudioStub {
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner,
scoped_ptr<AudioPlayer> audio_player);
virtual ~AudioDecodeScheduler();
~AudioDecodeScheduler() override;
// Initializes decoder with the information from the protocol config.
void Initialize(const protocol::SessionConfig& config);
// AudioStub implementation.
virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
const base::Closure& done) override;
void ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
const base::Closure& done) override;
private:
class Core;
......
......@@ -29,13 +29,9 @@ class FakeAudioPlayer : public AudioPlayer {
FakeAudioPlayer() {
}
virtual bool ResetAudioPlayer(AudioPacket::SamplingRate) override {
return true;
}
bool ResetAudioPlayer(AudioPacket::SamplingRate) override { return true; }
virtual uint32 GetSamplesPerFrame() override {
return kAudioSamplesPerFrame;
}
uint32 GetSamplesPerFrame() override { return kAudioSamplesPerFrame; }
};
class AudioPlayerTest : public ::testing::Test {
......
......@@ -47,7 +47,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
VideoRenderer* video_renderer,
scoped_ptr<AudioPlayer> audio_player);
virtual ~ChromotingClient();
~ChromotingClient() override;
void SetProtocolConfigForTests(
scoped_ptr<protocol::CandidateSessionConfig> config);
......@@ -71,28 +71,23 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
protocol::InputStub* input_stub() { return connection_.input_stub(); }
// ClientStub implementation.
virtual void SetCapabilities(
const protocol::Capabilities& capabilities) override;
virtual void SetPairingResponse(
void SetCapabilities(const protocol::Capabilities& capabilities) override;
void SetPairingResponse(
const protocol::PairingResponse& pairing_response) override;
virtual void DeliverHostMessage(
const protocol::ExtensionMessage& message) override;
void DeliverHostMessage(const protocol::ExtensionMessage& message) override;
// ClipboardStub implementation for receiving clipboard data from host.
virtual void InjectClipboardEvent(
const protocol::ClipboardEvent& event) override;
void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
// CursorShapeStub implementation for receiving cursor shape updates.
virtual void SetCursorShape(
const protocol::CursorShapeInfo& cursor_shape) override;
void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override;
// ConnectionToHost::HostEventCallback implementation.
virtual void OnConnectionState(
protocol::ConnectionToHost::State state,
protocol::ErrorCode error) override;
virtual void OnConnectionReady(bool ready) override;
virtual void OnRouteChanged(const std::string& channel_name,
const protocol::TransportRoute& route) override;
void OnConnectionState(protocol::ConnectionToHost::State state,
protocol::ErrorCode error) override;
void OnConnectionReady(bool ready) override;
void OnRouteChanged(const std::string& channel_name,
const protocol::TransportRoute& route) override;
private:
// Called when the connection is authenticated.
......
......@@ -30,19 +30,19 @@ class FrameConsumerProxy
const base::WeakPtr<FrameConsumer>& frame_consumer);
// FrameConsumer implementation.
virtual void ApplyBuffer(const webrtc::DesktopSize& view_size,
const webrtc::DesktopRect& clip_area,
webrtc::DesktopFrame* buffer,
const webrtc::DesktopRegion& region,
const webrtc::DesktopRegion& shape) override;
virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) override;
virtual void SetSourceSize(const webrtc::DesktopSize& source_size,
const webrtc::DesktopVector& dpi) override;
virtual PixelFormat GetPixelFormat() override;
void ApplyBuffer(const webrtc::DesktopSize& view_size,
const webrtc::DesktopRect& clip_area,
webrtc::DesktopFrame* buffer,
const webrtc::DesktopRegion& region,
const webrtc::DesktopRegion& shape) override;
void ReturnBuffer(webrtc::DesktopFrame* buffer) override;
void SetSourceSize(const webrtc::DesktopSize& source_size,
const webrtc::DesktopVector& dpi) override;
PixelFormat GetPixelFormat() override;
private:
friend class base::RefCountedThreadSafe<FrameConsumerProxy>;
virtual ~FrameConsumerProxy();
~FrameConsumerProxy() override;
base::WeakPtr<FrameConsumer> frame_consumer_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
......
......@@ -22,7 +22,7 @@ class KeyEventMapper : public protocol::InputFilter {
public:
KeyEventMapper();
explicit KeyEventMapper(InputStub* input_stub);
virtual ~KeyEventMapper();
~KeyEventMapper() override;
// Callback type for use with SetTrapCallback(), below.
typedef base::Callback<void(const protocol::KeyEvent&)> KeyTrapCallback;
......@@ -39,7 +39,7 @@ class KeyEventMapper : public protocol::InputFilter {
void RemapKey(uint32 in_usb_keycode, uint32 out_usb_keycode);
// InputFilter overrides.
virtual void InjectKeyEvent(const protocol::KeyEvent& event) override;
void InjectKeyEvent(const protocol::KeyEvent& event) override;
private:
std::map<uint32,uint32> mapped_keys;
......
......@@ -104,37 +104,33 @@ class ChromotingInstance :
static const int kApiMinScriptableVersion = 5;
explicit ChromotingInstance(PP_Instance instance);
virtual ~ChromotingInstance();
~ChromotingInstance() override;
// pp::Instance interface.
virtual void DidChangeFocus(bool has_focus) override;
virtual void DidChangeView(const pp::View& view) override;
virtual bool Init(uint32_t argc, const char* argn[],
const char* argv[]) override;
virtual void HandleMessage(const pp::Var& message) override;
virtual bool HandleInputEvent(const pp::InputEvent& event) override;
void DidChangeFocus(bool has_focus) override;
void DidChangeView(const pp::View& view) override;
bool Init(uint32_t argc, const char* argn[], const char* argv[]) override;
void HandleMessage(const pp::Var& message) override;
bool HandleInputEvent(const pp::InputEvent& event) override;
// ClientUserInterface interface.
virtual void OnConnectionState(protocol::ConnectionToHost::State state,
protocol::ErrorCode error) override;
virtual void OnConnectionReady(bool ready) override;
virtual void OnRouteChanged(const std::string& channel_name,
const protocol::TransportRoute& route) override;
virtual void SetCapabilities(const std::string& capabilities) override;
virtual void SetPairingResponse(
void OnConnectionState(protocol::ConnectionToHost::State state,
protocol::ErrorCode error) override;
void OnConnectionReady(bool ready) override;
void OnRouteChanged(const std::string& channel_name,
const protocol::TransportRoute& route) override;
void SetCapabilities(const std::string& capabilities) override;
void SetPairingResponse(
const protocol::PairingResponse& pairing_response) override;
virtual void DeliverHostMessage(
const protocol::ExtensionMessage& message) override;
virtual protocol::ClipboardStub* GetClipboardStub() override;
virtual protocol::CursorShapeStub* GetCursorShapeStub() override;
void DeliverHostMessage(const protocol::ExtensionMessage& message) override;
protocol::ClipboardStub* GetClipboardStub() override;
protocol::CursorShapeStub* GetCursorShapeStub() override;
// protocol::ClipboardStub interface.
virtual void InjectClipboardEvent(
const protocol::ClipboardEvent& event) override;
void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
// protocol::CursorShapeStub interface.
virtual void SetCursorShape(
const protocol::CursorShapeInfo& cursor_shape) override;
void SetCursorShape(const protocol::CursorShapeInfo& cursor_shape) override;
// Called by PepperView.
void SetDesktopSize(const webrtc::DesktopSize& size,
......@@ -244,12 +240,13 @@ class ChromotingInstance :
const protocol::SecretFetchedCallback& secret_fetched_callback);
// MediaSourceVideoRenderer::Delegate implementation.
virtual void OnMediaSourceSize(const webrtc::DesktopSize& size,
const webrtc::DesktopVector& dpi) override;
virtual void OnMediaSourceShape(const webrtc::DesktopRegion& shape) override;
virtual void OnMediaSourceReset(const std::string& format) override;
virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size,
bool keyframe) override;
void OnMediaSourceSize(const webrtc::DesktopSize& size,
const webrtc::DesktopVector& dpi) override;
void OnMediaSourceShape(const webrtc::DesktopRegion& shape) override;
void OnMediaSourceReset(const std::string& format) override;
void OnMediaSourceData(uint8_t* buffer,
size_t buffer_size,
bool keyframe) override;
bool initialized_;
......
......@@ -21,20 +21,20 @@ class DelegatingSignalStrategy : public SignalStrategy {
DelegatingSignalStrategy(std::string local_jid,
const SendIqCallback& send_iq_callback);
virtual ~DelegatingSignalStrategy();
~DelegatingSignalStrategy() override;
void OnIncomingMessage(const std::string& message);
// SignalStrategy interface.
virtual void Connect() override;
virtual void Disconnect() override;
virtual State GetState() const override;
virtual Error GetError() const override;
virtual std::string GetLocalJid() const override;
virtual void AddListener(Listener* listener) override;
virtual void RemoveListener(Listener* listener) override;
virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override;
virtual std::string GetNextId() override;
void Connect() override;
void Disconnect() override;
State GetState() const override;
Error GetError() const override;
std::string GetLocalJid() const override;
void AddListener(Listener* listener) override;
void RemoveListener(Listener* listener) override;
bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override;
std::string GetNextId() override;
private:
std::string local_jid_;
......
......@@ -22,18 +22,18 @@ class MediaSourceVideoRenderer::VideoWriter : public mkvmuxer::IMkvWriter {
typedef std::vector<uint8_t> DataBuffer;
VideoWriter(const webrtc::DesktopSize& frame_size, const char* codec_id);
virtual ~VideoWriter();
~VideoWriter() override;
const webrtc::DesktopSize& size() { return frame_size_; }
int64_t last_frame_timestamp() { return timecode_ - kFrameIntervalNs; }
// IMkvWriter interface.
virtual mkvmuxer::int32 Write(const void* buf, mkvmuxer::uint32 len) override;
virtual mkvmuxer::int64 Position() const override;
virtual mkvmuxer::int32 Position(mkvmuxer::int64 position) override;
virtual bool Seekable() const override;
virtual void ElementStartNotify(mkvmuxer::uint64 element_id,
mkvmuxer::int64 position) override;
mkvmuxer::int32 Write(const void* buf, mkvmuxer::uint32 len) override;
mkvmuxer::int64 Position() const override;
mkvmuxer::int32 Position(mkvmuxer::int64 position) override;
bool Seekable() const override;
void ElementStartNotify(mkvmuxer::uint64 element_id,
mkvmuxer::int64 position) override;
scoped_ptr<DataBuffer> OnVideoFrame(const std::string& video_data,
bool keyframe);
......
......@@ -43,13 +43,13 @@ class MediaSourceVideoRenderer : public VideoRenderer {
};
explicit MediaSourceVideoRenderer(Delegate* delegate);
virtual ~MediaSourceVideoRenderer();
~MediaSourceVideoRenderer() override;
// VideoRenderer interface.
virtual void Initialize(const protocol::SessionConfig& config) override;
virtual ChromotingStats* GetStats() override;
virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
const base::Closure& done) override;
void Initialize(const protocol::SessionConfig& config) override;
ChromotingStats* GetStats() override;
void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
const base::Closure& done) override;
private:
// Helper class used to generate WebM stream.
......
......@@ -23,11 +23,11 @@ namespace remoting {
class NormalizingInputFilterCros : public protocol::InputFilter {
public:
explicit NormalizingInputFilterCros(protocol::InputStub* input_stub);
virtual ~NormalizingInputFilterCros();
~NormalizingInputFilterCros() override;
// InputFilter overrides.
virtual void InjectKeyEvent(const protocol::KeyEvent& event) override;
virtual void InjectMouseEvent(const protocol::MouseEvent& event) override;
void InjectKeyEvent(const protocol::KeyEvent& event) override;
void InjectMouseEvent(const protocol::MouseEvent& event) override;
private:
void ProcessKeyDown(const protocol::KeyEvent& event);
......
......@@ -45,10 +45,10 @@ namespace remoting {
class NormalizingInputFilterMac : public protocol::InputFilter {
public:
explicit NormalizingInputFilterMac(protocol::InputStub* input_stub);
virtual ~NormalizingInputFilterMac();
~NormalizingInputFilterMac() override;
// InputFilter overrides.
virtual void InjectKeyEvent(const protocol::KeyEvent& event) override;
void InjectKeyEvent(const protocol::KeyEvent& event) override;
private:
typedef std::map<int, protocol::KeyEvent> KeyPressedMap;
......
......@@ -16,14 +16,13 @@ namespace remoting {
class PepperAddressResolver : public rtc::AsyncResolverInterface {
public:
explicit PepperAddressResolver(const pp::InstanceHandle& instance);
virtual ~PepperAddressResolver();
~PepperAddressResolver() override;
// rtc::AsyncResolverInterface.
virtual void Start(const rtc::SocketAddress& addr) override;
virtual bool GetResolvedAddress(int family,
rtc::SocketAddress* addr) const override;
virtual int GetError() const override;
virtual void Destroy(bool wait) override;
void Start(const rtc::SocketAddress& addr) override;
bool GetResolvedAddress(int family, rtc::SocketAddress* addr) const override;
int GetError() const override;
void Destroy(bool wait) override;
private:
void OnResolved(int32_t result);
......
......@@ -16,12 +16,11 @@ namespace remoting {
class PepperAudioPlayer : public AudioPlayer {
public:
explicit PepperAudioPlayer(pp::Instance* instance);
virtual ~PepperAudioPlayer();
~PepperAudioPlayer() override;
virtual uint32 GetSamplesPerFrame() override;
uint32 GetSamplesPerFrame() override;
virtual bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate)
override;
bool ResetAudioPlayer(AudioPacket::SamplingRate sampling_rate) override;
private:
pp::Instance* instance_;
......
......@@ -18,7 +18,7 @@ namespace remoting {
class ChromotingModule : public pp::Module {
protected:
virtual ChromotingInstance* CreateInstance(PP_Instance instance) override {
ChromotingInstance* CreateInstance(PP_Instance instance) override {
return new ChromotingInstance(instance);
}
};
......
......@@ -28,7 +28,7 @@ class PepperInputHandler : public pp::MouseLock {
public:
// |instance| must outlive |this|.
explicit PepperInputHandler(pp::Instance* instance);
virtual ~PepperInputHandler();
~PepperInputHandler() override;
void set_input_stub(protocol::InputStub* input_stub) {
input_stub_ = input_stub;
......@@ -64,7 +64,7 @@ class PepperInputHandler : public pp::MouseLock {
};
// pp::MouseLock interface.
virtual void MouseLockLost() override;
void MouseLockLost() override;
// Requests the browser to lock the mouse and hides the cursor.
void RequestMouseLock();
......
......@@ -24,11 +24,11 @@ namespace remoting {
class PepperNetworkManager : public rtc::NetworkManagerBase {
public:
PepperNetworkManager(const pp::InstanceHandle& instance);
virtual ~PepperNetworkManager();
~PepperNetworkManager() override;
// NetworkManager interface.
virtual void StartUpdating() override;
virtual void StopUpdating() override;
void StartUpdating() override;
void StopUpdating() override;
private:
static void OnNetworkListCallbackHandler(void* user_data,
......
......@@ -86,7 +86,7 @@ int PepperErrorToNetError(int error) {
class UdpPacketSocket : public rtc::AsyncPacketSocket {
public:
explicit UdpPacketSocket(const pp::InstanceHandle& instance);
virtual ~UdpPacketSocket();
~UdpPacketSocket() override;
// |min_port| and |max_port| are set to zero if the port number
// should be assigned by the OS.
......@@ -95,20 +95,21 @@ class UdpPacketSocket : public rtc::AsyncPacketSocket {
int max_port);
// rtc::AsyncPacketSocket interface.
virtual rtc::SocketAddress GetLocalAddress() const override;
virtual rtc::SocketAddress GetRemoteAddress() const override;
virtual int Send(const void* data, size_t data_size,
const rtc::PacketOptions& options) override;
virtual int SendTo(const void* data,
size_t data_size,
const rtc::SocketAddress& address,
const rtc::PacketOptions& options) override;
virtual int Close() override;
virtual State GetState() const override;
virtual int GetOption(rtc::Socket::Option opt, int* value) override;
virtual int SetOption(rtc::Socket::Option opt, int value) override;
virtual int GetError() const override;
virtual void SetError(int error) override;
rtc::SocketAddress GetLocalAddress() const override;
rtc::SocketAddress GetRemoteAddress() const override;
int Send(const void* data,
size_t data_size,
const rtc::PacketOptions& options) override;
int SendTo(const void* data,
size_t data_size,
const rtc::SocketAddress& address,
const rtc::PacketOptions& options) override;
int Close() override;
State GetState() const override;
int GetOption(rtc::Socket::Option opt, int* value) override;
int SetOption(rtc::Socket::Option opt, int value) override;