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