Commit 9ba5a272 authored by dcheng's avatar dcheng Committed by Commit bot

Update {virtual,override,final} to follow C++11 style in ui.

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

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

Cr-Commit-Position: refs/heads/master@{#314967}
parent 87430f2e
......@@ -19,7 +19,7 @@ class TestResourceManagerImpl : public ResourceManagerImpl {
explicit TestResourceManagerImpl(UIResourceProvider* provider)
: ResourceManagerImpl(provider) {}
virtual ~TestResourceManagerImpl() {}
~TestResourceManagerImpl() override {}
void SetResourceAsLoaded(AndroidResourceType res_type, int res_id) {
SkBitmap small_bitmap;
......@@ -57,7 +57,7 @@ class MockUIResourceProvider : public ui::UIResourceProvider {
virtual ~MockUIResourceProvider() {}
virtual cc::UIResourceId CreateUIResource(
cc::UIResourceId CreateUIResource(
ui::UIResourceClientAndroid* client) override {
if (!has_layer_tree_host_)
return 0;
......@@ -67,12 +67,12 @@ class MockUIResourceProvider : public ui::UIResourceProvider {
return id;
}
virtual void DeleteUIResource(cc::UIResourceId id) override {
void DeleteUIResource(cc::UIResourceId id) override {
CHECK(has_layer_tree_host_);
ui_resource_client_map_.erase(id);
}
virtual bool SupportsETC1NonPowerOfTwo() const override { return true; }
bool SupportsETC1NonPowerOfTwo() const override { return true; }
void LayerTreeHostCleared() {
has_layer_tree_host_ = false;
......
......@@ -28,12 +28,12 @@ class EVENTS_BASE_EXPORT Scroller : public GestureCurve {
};
explicit Scroller(const Config& config);
virtual ~Scroller();
~Scroller() override;
// GestureCurve implementation.
virtual bool ComputeScrollOffset(base::TimeTicks time,
gfx::Vector2dF* offset,
gfx::Vector2dF* velocity) override;
bool ComputeScrollOffset(base::TimeTicks time,
gfx::Vector2dF* offset,
gfx::Vector2dF* velocity) override;
// Start scrolling by providing a starting point and the distance to travel.
// The default value of 250 milliseconds will be used for the duration.
......
......@@ -15,20 +15,19 @@ class ScreenAndroid : public Screen {
public:
ScreenAndroid() {}
virtual gfx::Point GetCursorScreenPoint() override { return gfx::Point(); }
gfx::Point GetCursorScreenPoint() override { return gfx::Point(); }
virtual gfx::NativeWindow GetWindowUnderCursor() override {
gfx::NativeWindow GetWindowUnderCursor() override {
NOTIMPLEMENTED();
return NULL;
}
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
override {
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override {
NOTIMPLEMENTED();
return NULL;
}
virtual gfx::Display GetPrimaryDisplay() const override {
gfx::Display GetPrimaryDisplay() const override {
gfx::DeviceDisplayInfo device_info;
const float device_scale_factor = device_info.GetDIPScale();
// Note: GetPhysicalDisplayWidth/Height() does not subtract window
......@@ -51,32 +50,29 @@ class ScreenAndroid : public Screen {
return display;
}
virtual gfx::Display GetDisplayNearestWindow(
gfx::NativeView view) const override {
gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override {
return GetPrimaryDisplay();
}
virtual gfx::Display GetDisplayNearestPoint(
const gfx::Point& point) const override {
gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override {
return GetPrimaryDisplay();
}
virtual int GetNumDisplays() const override { return 1; }
int GetNumDisplays() const override { return 1; }
virtual std::vector<gfx::Display> GetAllDisplays() const override {
std::vector<gfx::Display> GetAllDisplays() const override {
return std::vector<gfx::Display>(1, GetPrimaryDisplay());
}
virtual gfx::Display GetDisplayMatching(
const gfx::Rect& match_rect) const override {
gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override {
return GetPrimaryDisplay();
}
virtual void AddObserver(DisplayObserver* observer) override {
void AddObserver(DisplayObserver* observer) override {
// no display change on Android.
}
virtual void RemoveObserver(DisplayObserver* observer) override {
void RemoveObserver(DisplayObserver* observer) override {
// no display change on Android.
}
......
......@@ -26,18 +26,18 @@ class GLNonOwnedContext : public GLContextReal {
GLNonOwnedContext(GLShareGroup* share_group);
// Implement GLContext.
virtual bool Initialize(GLSurface* compatible_surface,
GpuPreference gpu_preference) override;
virtual void Destroy() override {}
virtual bool MakeCurrent(GLSurface* surface) override;
virtual void ReleaseCurrent(GLSurface* surface) override {}
virtual bool IsCurrent(GLSurface* surface) override { return true; }
virtual void* GetHandle() override { return NULL; }
virtual void OnSetSwapInterval(int interval) override {}
virtual std::string GetExtensions() override;
bool Initialize(GLSurface* compatible_surface,
GpuPreference gpu_preference) override;
void Destroy() override {}
bool MakeCurrent(GLSurface* surface) override;
void ReleaseCurrent(GLSurface* surface) override {}
bool IsCurrent(GLSurface* surface) override { return true; }
void* GetHandle() override { return NULL; }
void OnSetSwapInterval(int interval) override {}
std::string GetExtensions() override;
protected:
virtual ~GLNonOwnedContext() {}
~GLNonOwnedContext() override {}
private:
DISALLOW_COPY_AND_ASSIGN(GLNonOwnedContext);
......
......@@ -19,23 +19,23 @@ class GL_EXPORT GLImageSurfaceTexture : public GLImage {
bool Initialize(SurfaceTexture* surface_texture);
// Overridden from GLImage:
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,
OverlayTransform transform,
const Rect& bounds_rect,
const 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,
OverlayTransform transform,
const Rect& bounds_rect,
const RectF& crop_rect) override;
protected:
virtual ~GLImageSurfaceTexture();
~GLImageSurfaceTexture() override;
private:
scoped_refptr<SurfaceTexture> surface_texture_;
......
......@@ -14,11 +14,11 @@ class NativeThemeAndroid : public NativeThemeBase {
public:
static NativeThemeAndroid* instance();
virtual SkColor GetSystemColor(ColorId color_id) const override;
SkColor GetSystemColor(ColorId color_id) const override;
private:
NativeThemeAndroid();
virtual ~NativeThemeAndroid();
~NativeThemeAndroid() override;
DISALLOW_COPY_AND_ASSIGN(NativeThemeAndroid);
};
......
......@@ -31,31 +31,30 @@ class SelectFileDialogImpl : public SelectFileDialog {
void OnFileNotSelected(JNIEnv* env, jobject java_object);
// From SelectFileDialog
virtual bool IsRunning(gfx::NativeWindow) const override;
virtual void ListenerDestroyed() override;
bool IsRunning(gfx::NativeWindow) const override;
void ListenerDestroyed() override;
// Called when it is time to display the file picker.
// params is expected to be a vector<string16> with accept_types first and
// the capture value as the last element of the vector.
virtual void SelectFileImpl(
SelectFileDialog::Type type,
const base::string16& title,
const base::FilePath& default_path,
const SelectFileDialog::FileTypeInfo* file_types,
int file_type_index,
const std::string& default_extension,
gfx::NativeWindow owning_window,
void* params) override;
void SelectFileImpl(SelectFileDialog::Type type,
const base::string16& title,
const base::FilePath& default_path,
const SelectFileDialog::FileTypeInfo* file_types,
int file_type_index,
const std::string& default_extension,
gfx::NativeWindow owning_window,
void* params) override;
static bool RegisterSelectFileDialog(JNIEnv* env);
protected:
virtual ~SelectFileDialogImpl();
~SelectFileDialogImpl() override;
private:
SelectFileDialogImpl(Listener* listener, SelectFilePolicy* policy);
virtual bool HasMultipleFileTypeChoicesImpl() override;
bool HasMultipleFileTypeChoicesImpl() override;
base::android::ScopedJavaGlobalRef<jobject> java_object_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment