Skip to content

Commit

Permalink
Update {virtual,override,final} to follow C++11 style.
Browse files Browse the repository at this point in the history
The Google style guide states that only one of {virtual,override,final}
should be used for each declaration, since override implies virtual and
final implies both virtual and override.

This patch was automatically generated with an OS=android build using a
variation of https://codereview.chromium.org/598073004.

BUG=417463
R=creis@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#314647}
  • Loading branch information
zetafunction authored and Commit bot committed Feb 4, 2015
1 parent 517bbfa commit 4d4461f
Show file tree
Hide file tree
Showing 33 changed files with 188 additions and 202 deletions.
19 changes: 9 additions & 10 deletions content/app/android/child_process_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ class SurfaceTextureManagerImpl : public SurfaceTextureManager,
SurfaceTexturePeer::InitInstance(this);
GpuSurfaceLookup::InitInstance(this);
}
virtual ~SurfaceTextureManagerImpl() {
~SurfaceTextureManagerImpl() override {
SurfaceTexturePeer::InitInstance(NULL);
GpuSurfaceLookup::InitInstance(NULL);
}

// Overridden from SurfaceTextureManager:
virtual void RegisterSurfaceTexture(
int surface_texture_id,
int client_id,
gfx::SurfaceTexture* surface_texture) override {
void RegisterSurfaceTexture(int surface_texture_id,
int client_id,
gfx::SurfaceTexture* surface_texture) override {
JNIEnv* env = base::android::AttachCurrentThread();
Java_ChildProcessService_createSurfaceTextureSurface(
env,
Expand All @@ -62,13 +61,13 @@ class SurfaceTextureManagerImpl : public SurfaceTextureManager,
client_id,
surface_texture->j_surface_texture().obj());
}
virtual void UnregisterSurfaceTexture(int surface_texture_id,
int client_id) override {
void UnregisterSurfaceTexture(int surface_texture_id,
int client_id) override {
JNIEnv* env = base::android::AttachCurrentThread();
Java_ChildProcessService_destroySurfaceTextureSurface(
env, service_.obj(), surface_texture_id, client_id);
}
virtual gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
int surface_texture_id) override {
JNIEnv* env = base::android::AttachCurrentThread();
gfx::ScopedJavaSurface surface(
Expand All @@ -89,7 +88,7 @@ class SurfaceTextureManagerImpl : public SurfaceTextureManager,
}

// Overridden from SurfaceTexturePeer:
virtual void EstablishSurfaceTexturePeer(
void EstablishSurfaceTexturePeer(
base::ProcessHandle pid,
scoped_refptr<gfx::SurfaceTexture> surface_texture,
int primary_id,
Expand All @@ -105,7 +104,7 @@ class SurfaceTextureManagerImpl : public SurfaceTextureManager,
}

// Overridden from GpuSurfaceLookup:
virtual gfx::AcceleratedWidget AcquireNativeWidget(int surface_id) override {
gfx::AcceleratedWidget AcquireNativeWidget(int surface_id) override {
JNIEnv* env = base::android::AttachCurrentThread();
gfx::ScopedJavaSurface surface(
content::Java_ChildProcessService_getViewSurface(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GpuMemoryBufferFactorySurfaceTexture : public GpuMemoryBufferFactory,
public gpu::ImageFactory {
public:
GpuMemoryBufferFactorySurfaceTexture();
~GpuMemoryBufferFactorySurfaceTexture();
~GpuMemoryBufferFactorySurfaceTexture() override;

static bool IsGpuMemoryBufferConfigurationSupported(
gfx::GpuMemoryBuffer::Format format,
Expand Down
10 changes: 5 additions & 5 deletions content/common/gpu/image_transport_surface_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ class ImageTransportSurfaceAndroid
const gfx::GLSurfaceHandle& handle);

// gfx::GLSurface implementation.
virtual bool OnMakeCurrent(gfx::GLContext* context) override;
virtual void WakeUpGpu() override;
bool OnMakeCurrent(gfx::GLContext* context) override;
void WakeUpGpu() override;

protected:
virtual ~ImageTransportSurfaceAndroid();
~ImageTransportSurfaceAndroid() override;

private:
void ScheduleWakeUp();
Expand All @@ -59,10 +59,10 @@ class DirectSurfaceAndroid : public PassThroughImageTransportSurface {
gfx::GLSurface* surface);

// gfx::GLSurface implementation.
virtual bool SwapBuffers() override;
bool SwapBuffers() override;

protected:
virtual ~DirectSurfaceAndroid();
~DirectSurfaceAndroid() override;

private:
DISALLOW_COPY_AND_ASSIGN(DirectSurfaceAndroid);
Expand Down
19 changes: 9 additions & 10 deletions content/common/gpu/media/android_video_decode_accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator
const base::Callback<bool(void)>& make_context_current);

// media::VideoDecodeAccelerator implementation.
virtual bool Initialize(media::VideoCodecProfile profile,
Client* client) override;
virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
virtual void AssignPictureBuffers(
bool Initialize(media::VideoCodecProfile profile, Client* client) override;
void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
void AssignPictureBuffers(
const std::vector<media::PictureBuffer>& buffers) override;
virtual void ReusePictureBuffer(int32 picture_buffer_id) override;
virtual void Flush() override;
virtual void Reset() override;
virtual void Destroy() override;
virtual bool CanDecodeOnIOThread() override;
void ReusePictureBuffer(int32 picture_buffer_id) override;
void Flush() override;
void Reset() override;
void Destroy() override;
bool CanDecodeOnIOThread() override;

private:
enum State {
Expand All @@ -56,7 +55,7 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator

static const base::TimeDelta kDecodePollDelay;

virtual ~AndroidVideoDecodeAccelerator();
~AndroidVideoDecodeAccelerator() override;

// Configures |media_codec_| with the given codec parameters from the client.
bool ConfigureMediaCodec();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,27 @@ namespace content {
class MockVideoDecodeAcceleratorClient
: public media::VideoDecodeAccelerator::Client {
public:
MockVideoDecodeAcceleratorClient() {};
virtual ~MockVideoDecodeAcceleratorClient() {};
MockVideoDecodeAcceleratorClient() {}
~MockVideoDecodeAcceleratorClient() override {}

// VideoDecodeAccelerator::Client implementation.
virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers,
const gfx::Size& dimensions,
uint32 texture_target) override {};
virtual void DismissPictureBuffer(int32 picture_buffer_id) override {};
virtual void PictureReady(const media::Picture& picture) override {};
virtual void NotifyEndOfBitstreamBuffer(
int32 bitstream_buffer_id) override {};
virtual void NotifyFlushDone() override {};
virtual void NotifyResetDone() override {};
virtual void NotifyError(
media::VideoDecodeAccelerator::Error error) override {};
void ProvidePictureBuffers(uint32 requested_num_of_buffers,
const gfx::Size& dimensions,
uint32 texture_target) override {}
void DismissPictureBuffer(int32 picture_buffer_id) override {}
void PictureReady(const media::Picture& picture) override {}
void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override {}
void NotifyFlushDone() override {}
void NotifyResetDone() override {}
void NotifyError(media::VideoDecodeAccelerator::Error error) override {}
};

class AndroidVideoDecodeAcceleratorTest : public testing::Test {
public:
virtual ~AndroidVideoDecodeAcceleratorTest() {}
~AndroidVideoDecodeAcceleratorTest() override {}

protected:
virtual void SetUp() override {
void SetUp() override {
JNIEnv* env = base::android::AttachCurrentThread();
media::RegisterJni(env);
// TODO(felipeg): fix GL bindings, so that the decoder can perform GL
Expand Down
29 changes: 14 additions & 15 deletions content/common/gpu/media/android_video_encode_accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,22 @@ class CONTENT_EXPORT AndroidVideoEncodeAccelerator
: public media::VideoEncodeAccelerator {
public:
AndroidVideoEncodeAccelerator();
virtual ~AndroidVideoEncodeAccelerator();
~AndroidVideoEncodeAccelerator() override;

// media::VideoEncodeAccelerator implementation.
virtual std::vector<media::VideoEncodeAccelerator::SupportedProfile>
GetSupportedProfiles() override;
virtual bool Initialize(media::VideoFrame::Format format,
const gfx::Size& input_visible_size,
media::VideoCodecProfile output_profile,
uint32 initial_bitrate,
Client* client) override;
virtual void Encode(const scoped_refptr<media::VideoFrame>& frame,
bool force_keyframe) override;
virtual void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer)
override;
virtual void RequestEncodingParametersChange(uint32 bitrate,
uint32 framerate) override;
virtual void Destroy() override;
std::vector<media::VideoEncodeAccelerator::SupportedProfile>
GetSupportedProfiles() override;
bool Initialize(media::VideoFrame::Format format,
const gfx::Size& input_visible_size,
media::VideoCodecProfile output_profile,
uint32 initial_bitrate,
Client* client) override;
void Encode(const scoped_refptr<media::VideoFrame>& frame,
bool force_keyframe) override;
void UseOutputBitstreamBuffer(const media::BitstreamBuffer& buffer) override;
void RequestEncodingParametersChange(uint32 bitrate,
uint32 framerate) override;
void Destroy() override;

private:
enum {
Expand Down
34 changes: 17 additions & 17 deletions content/common/gpu/stream_texture_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,32 @@ class StreamTexture : public gfx::GLImage,
StreamTexture(GpuCommandBufferStub* owner_stub,
int32 route_id,
uint32 texture_id);
virtual ~StreamTexture();
~StreamTexture() override;

// gfx::GLImage implementation:
virtual void Destroy(bool have_context) override;
virtual gfx::Size GetSize() override;
virtual bool BindTexImage(unsigned target) override;
virtual void ReleaseTexImage(unsigned target) override;
virtual bool CopyTexImage(unsigned target) override;
virtual void WillUseTexImage() override;
virtual void DidUseTexImage() override {}
virtual void WillModifyTexImage() override {}
virtual void DidModifyTexImage() override {}
virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
gfx::OverlayTransform transform,
const gfx::Rect& bounds_rect,
const gfx::RectF& crop_rect) override;
void Destroy(bool have_context) override;
gfx::Size GetSize() override;
bool BindTexImage(unsigned target) override;
void ReleaseTexImage(unsigned target) override;
bool CopyTexImage(unsigned target) override;
void WillUseTexImage() override;
void DidUseTexImage() override {}
void WillModifyTexImage() override {}
void DidModifyTexImage() override {}
bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
int z_order,
gfx::OverlayTransform transform,
const gfx::Rect& bounds_rect,
const gfx::RectF& crop_rect) override;

// GpuCommandBufferStub::DestructionObserver implementation.
virtual void OnWillDestroyStub() override;
void OnWillDestroyStub() override;

// Called when a new frame is available for the SurfaceTexture.
void OnFrameAvailable();

// IPC::Listener implementation:
virtual bool OnMessageReceived(const IPC::Message& message) override;
bool OnMessageReceived(const IPC::Message& message) override;

// IPC message handlers:
void OnStartListening();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ namespace content {
class SandboxBPFBasePolicyAndroid : public SandboxBPFBasePolicy {
public:
SandboxBPFBasePolicyAndroid();
virtual ~SandboxBPFBasePolicyAndroid();
~SandboxBPFBasePolicyAndroid() override;

// sandbox::SandboxBPFPolicy:
virtual sandbox::bpf_dsl::ResultExpr EvaluateSyscall(
sandbox::bpf_dsl::ResultExpr EvaluateSyscall(
int system_call_number) const override;

private:
Expand Down
2 changes: 1 addition & 1 deletion content/public/browser/android/content_protocol_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CONTENT_EXPORT ContentProtocolHandler :
const scoped_refptr<base::TaskRunner>& content_task_runner);

protected:
virtual ~ContentProtocolHandler() {}
~ContentProtocolHandler() override {}
};

} // namespace content
Expand Down
13 changes: 6 additions & 7 deletions content/public/test/nested_message_pump_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ class NestedMessagePumpAndroid : public base::MessagePumpForUI {
public:
NestedMessagePumpAndroid();

virtual void Run(Delegate* delegate) override;
virtual void Quit() override;
virtual void ScheduleWork() override;
virtual void ScheduleDelayedWork(
const base::TimeTicks& delayed_work_time) override;
virtual void Start(Delegate* delegate) override;
void Run(Delegate* delegate) override;
void Quit() override;
void ScheduleWork() override;
void ScheduleDelayedWork(const base::TimeTicks& delayed_work_time) override;
void Start(Delegate* delegate) override;

static bool RegisterJni(JNIEnv* env);

protected:
virtual ~NestedMessagePumpAndroid();
~NestedMessagePumpAndroid() override;

private:
// We may make recursive calls to Run, so we save state that needs to be
Expand Down
16 changes: 8 additions & 8 deletions content/renderer/android/address_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ namespace content {
class AddressDetector : public ContentDetector {
public:
AddressDetector();
virtual ~AddressDetector();
~AddressDetector() override;

private:
// Implementation of ContentDetector.
virtual bool FindContent(const base::string16::const_iterator& begin,
const base::string16::const_iterator& end,
size_t* start_pos,
size_t* end_pos,
std::string* content_text) override;
virtual GURL GetIntentURL(const std::string& content_text) override;
virtual size_t GetMaximumContentLength() override;
bool FindContent(const base::string16::const_iterator& begin,
const base::string16::const_iterator& end,
size_t* start_pos,
size_t* end_pos,
std::string* content_text) override;
GURL GetIntentURL(const std::string& content_text) override;
size_t GetMaximumContentLength() override;

std::string GetContentText(const base::string16& text);

Expand Down
14 changes: 7 additions & 7 deletions content/renderer/android/email_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class CONTENT_EXPORT EmailDetector : public ContentDetector {
friend class EmailDetectorTest;

// Implementation of ContentDetector.
virtual bool FindContent(const base::string16::const_iterator& begin,
const base::string16::const_iterator& end,
size_t* start_pos,
size_t* end_pos,
std::string* content_text) override;
virtual GURL GetIntentURL(const std::string& content_text) override;
virtual size_t GetMaximumContentLength() override;
bool FindContent(const base::string16::const_iterator& begin,
const base::string16::const_iterator& end,
size_t* start_pos,
size_t* end_pos,
std::string* content_text) override;
GURL GetIntentURL(const std::string& content_text) override;
size_t GetMaximumContentLength() override;

DISALLOW_COPY_AND_ASSIGN(EmailDetector);
};
Expand Down
16 changes: 8 additions & 8 deletions content/renderer/android/phone_number_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ class CONTENT_EXPORT PhoneNumberDetector : public ContentDetector {
public:
PhoneNumberDetector();
explicit PhoneNumberDetector(const std::string& region);
virtual ~PhoneNumberDetector();
~PhoneNumberDetector() override;

private:
friend class PhoneNumberDetectorTest;

// Implementation of ContentDetector.
virtual bool FindContent(const base::string16::const_iterator& begin,
const base::string16::const_iterator& end,
size_t* start_pos,
size_t* end_pos,
std::string* content_text) override;
virtual GURL GetIntentURL(const std::string& content_text) override;
virtual size_t GetMaximumContentLength() override;
bool FindContent(const base::string16::const_iterator& begin,
const base::string16::const_iterator& end,
size_t* start_pos,
size_t* end_pos,
std::string* content_text) override;
GURL GetIntentURL(const std::string& content_text) override;
size_t GetMaximumContentLength() override;

const std::string region_code_;

Expand Down
4 changes: 2 additions & 2 deletions content/renderer/android/renderer_date_time_picker.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RendererDateTimePicker : public RenderViewObserver {
RenderViewImpl* sender,
const blink::WebDateTimeChooserParams& params,
blink::WebDateTimeChooserCompletion* completion);
virtual ~RendererDateTimePicker();
~RendererDateTimePicker() override;

bool Open();

Expand All @@ -33,7 +33,7 @@ class RendererDateTimePicker : public RenderViewObserver {
void OnCancel();

// RenderViewObserver
virtual bool OnMessageReceived(const IPC::Message& message) override;
bool OnMessageReceived(const IPC::Message& message) override;

blink::WebDateTimeChooserParams chooser_params_;
blink::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us
Expand Down
Loading

0 comments on commit 4d4461f

Please sign in to comment.