summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgunsch <gunsch@chromium.org>2015-01-05 17:00:32 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-06 01:01:36 +0000
commit0cffcfcc81a27345965a05ad0654d7d5ccd9eea9 (patch)
treeffbc800882ffb5342acd4f9db26524d4419e7efc
parentcc60743c0fda1b9502d56439760471d01b80a96e (diff)
downloadchromium_src-0cffcfcc81a27345965a05ad0654d7d5ccd9eea9.zip
chromium_src-0cffcfcc81a27345965a05ad0654d7d5ccd9eea9.tar.gz
chromium_src-0cffcfcc81a27345965a05ad0654d7d5ccd9eea9.tar.bz2
virtual/override specifier cleanup in ui/ (mostly Ozone code).
These are changes detected by Chromecast not covered by the Linux build. See: https://codereview.chromium.org/831863003 R=sky@chromium.org,spang@chromium.org BUG=417463 Review URL: https://codereview.chromium.org/808333004 Cr-Commit-Position: refs/heads/master@{#310019}
-rw-r--r--ui/aura/test/ui_controls_factory_ozone.cc27
-rw-r--r--ui/aura/window_tree_host_ozone.h47
-rw-r--r--ui/base/cursor/cursor_loader_ozone.h20
-rw-r--r--ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h14
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_aura.h60
-rw-r--r--ui/compositor/test/test_compositor_host_ozone.cc6
-rw-r--r--ui/events/ozone/evdev/input_controller_evdev.h2
-rw-r--r--ui/events/ozone/evdev/tablet_event_converter_evdev.h2
-rw-r--r--ui/events/ozone/layout/no/no_keyboard_layout_engine.h22
-rw-r--r--ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h22
-rw-r--r--ui/gl/gl_surface_ozone.cc4
-rw-r--r--ui/ozone/platform/egltest/ozone_platform_egltest.cc4
-rw-r--r--ui/ozone/public/input_controller.cc2
13 files changed, 114 insertions, 118 deletions
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index 31b3c2e..2a25662 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -20,16 +20,16 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
public:
UIControlsOzone(WindowTreeHost* host) : host_(host) {}
- virtual bool SendKeyPress(gfx::NativeWindow window,
- ui::KeyboardCode key,
- bool control,
- bool shift,
- bool alt,
- bool command) override {
+ bool SendKeyPress(gfx::NativeWindow window,
+ ui::KeyboardCode key,
+ bool control,
+ bool shift,
+ bool alt,
+ bool command) override {
return SendKeyPressNotifyWhenDone(
window, key, control, shift, alt, command, base::Closure());
}
- virtual bool SendKeyPressNotifyWhenDone(
+ bool SendKeyPressNotifyWhenDone(
gfx::NativeWindow window,
ui::KeyboardCode key,
bool control,
@@ -86,10 +86,10 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
return true;
}
- virtual bool SendMouseMove(long screen_x, long screen_y) override {
+ bool SendMouseMove(long screen_x, long screen_y) override {
return SendMouseMoveNotifyWhenDone(screen_x, screen_y, base::Closure());
}
- virtual bool SendMouseMoveNotifyWhenDone(
+ bool SendMouseMoveNotifyWhenDone(
long screen_x,
long screen_y,
const base::Closure& closure) override {
@@ -116,11 +116,10 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseEvents(ui_controls::MouseButton type,
- int state) override {
+ bool SendMouseEvents(ui_controls::MouseButton type, int state) override {
return SendMouseEventsNotifyWhenDone(type, state, base::Closure());
}
- virtual bool SendMouseEventsNotifyWhenDone(
+ bool SendMouseEventsNotifyWhenDone(
ui_controls::MouseButton type,
int state,
const base::Closure& closure) override {
@@ -166,10 +165,10 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
RunClosureAfterAllPendingUIEvents(closure);
return true;
}
- virtual bool SendMouseClick(ui_controls::MouseButton type) override {
+ bool SendMouseClick(ui_controls::MouseButton type) override {
return SendMouseEvents(type, ui_controls::UP | ui_controls::DOWN);
}
- virtual void RunClosureAfterAllPendingUIEvents(
+ void RunClosureAfterAllPendingUIEvents(
const base::Closure& closure) override {
if (!closure.is_null())
base::MessageLoop::current()->PostTask(FROM_HERE, closure);
diff --git a/ui/aura/window_tree_host_ozone.h b/ui/aura/window_tree_host_ozone.h
index 1c33bb0..716ff7a 100644
--- a/ui/aura/window_tree_host_ozone.h
+++ b/ui/aura/window_tree_host_ozone.h
@@ -22,40 +22,39 @@ class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost,
public ui::PlatformWindowDelegate {
public:
explicit WindowTreeHostOzone(const gfx::Rect& bounds);
- virtual ~WindowTreeHostOzone();
+ ~WindowTreeHostOzone() override;
protected:
// WindowTreeHost:
- virtual gfx::Rect GetBounds() const override;
+ gfx::Rect GetBounds() const override;
private:
// ui::PlatformWindowDelegate:
- virtual void OnBoundsChanged(const gfx::Rect&) override;
- virtual void OnDamageRect(const gfx::Rect& damaged_region) override;
- virtual void DispatchEvent(ui::Event* event) override;
- virtual void OnCloseRequest() override;
- virtual void OnClosed() override;
- virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
- virtual void OnLostCapture() override;
- virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) override;
- virtual void OnActivationChanged(bool active) override;
+ void OnBoundsChanged(const gfx::Rect&) override;
+ void OnDamageRect(const gfx::Rect& damaged_region) override;
+ void DispatchEvent(ui::Event* event) override;
+ void OnCloseRequest() override;
+ void OnClosed() override;
+ void OnWindowStateChanged(ui::PlatformWindowState new_state) override;
+ void OnLostCapture() override;
+ void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
+ void OnActivationChanged(bool active) override;
// WindowTreeHost:
- virtual ui::EventSource* GetEventSource() override;
- virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
- virtual void Show() override;
- virtual void Hide() override;
- virtual void SetBounds(const gfx::Rect& bounds) override;
- virtual gfx::Point GetLocationOnNativeScreen() const override;
- virtual void SetCapture() override;
- virtual void ReleaseCapture() override;
- virtual void SetCursorNative(gfx::NativeCursor cursor_type) override;
- virtual void MoveCursorToNative(const gfx::Point& location) override;
- virtual void OnCursorVisibilityChangedNative(bool show) override;
+ ui::EventSource* GetEventSource() override;
+ gfx::AcceleratedWidget GetAcceleratedWidget() override;
+ void Show() override;
+ void Hide() override;
+ void SetBounds(const gfx::Rect& bounds) override;
+ gfx::Point GetLocationOnNativeScreen() const override;
+ void SetCapture() override;
+ void ReleaseCapture() override;
+ void SetCursorNative(gfx::NativeCursor cursor_type) override;
+ void MoveCursorToNative(const gfx::Point& location) override;
+ void OnCursorVisibilityChangedNative(bool show) override;
// ui::EventSource overrides.
- virtual ui::EventProcessor* GetEventProcessor() override;
+ ui::EventProcessor* GetEventProcessor() override;
// Platform-specific part of this WindowTreeHost.
scoped_ptr<ui::PlatformWindow> platform_window_;
diff --git a/ui/base/cursor/cursor_loader_ozone.h b/ui/base/cursor/cursor_loader_ozone.h
index 7aef431..26f8bac 100644
--- a/ui/base/cursor/cursor_loader_ozone.h
+++ b/ui/base/cursor/cursor_loader_ozone.h
@@ -15,18 +15,18 @@ namespace ui {
class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader {
public:
CursorLoaderOzone();
- virtual ~CursorLoaderOzone();
+ ~CursorLoaderOzone() override;
// CursorLoader overrides:
- virtual void LoadImageCursor(int id,
- int resource_id,
- const gfx::Point& hot) override;
- virtual void LoadAnimatedCursor(int id,
- int resource_id,
- const gfx::Point& hot,
- int frame_delay_ms) override;
- virtual void UnloadAll() override;
- virtual void SetPlatformCursor(gfx::NativeCursor* cursor) override;
+ void LoadImageCursor(int id,
+ int resource_id,
+ const gfx::Point& hot) override;
+ void LoadAnimatedCursor(int id,
+ int resource_id,
+ const gfx::Point& hot,
+ int frame_delay_ms) override;
+ void UnloadAll() override;
+ void SetPlatformCursor(gfx::NativeCursor* cursor) override;
private:
// Pointers are owned by ResourceBundle and must not be freed here.
diff --git a/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h b/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
index 037fd08..53c5999 100644
--- a/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
+++ b/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
@@ -53,22 +53,22 @@ class UI_BASE_EXPORT BitmapCursorOzone
class UI_BASE_EXPORT BitmapCursorFactoryOzone : public CursorFactoryOzone {
public:
BitmapCursorFactoryOzone();
- virtual ~BitmapCursorFactoryOzone();
+ ~BitmapCursorFactoryOzone() override;
// Convert PlatformCursor to BitmapCursorOzone.
static scoped_refptr<BitmapCursorOzone> GetBitmapCursor(
PlatformCursor platform_cursor);
// CursorFactoryOzone:
- virtual PlatformCursor GetDefaultCursor(int type) override;
- virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
- const gfx::Point& hotspot) override;
- virtual PlatformCursor CreateAnimatedCursor(
+ PlatformCursor GetDefaultCursor(int type) override;
+ PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
+ const gfx::Point& hotspot) override;
+ PlatformCursor CreateAnimatedCursor(
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& hotspot,
int frame_delay_ms) override;
- virtual void RefImageCursor(PlatformCursor cursor) override;
- virtual void UnrefImageCursor(PlatformCursor cursor) override;
+ void RefImageCursor(PlatformCursor cursor) override;
+ void UnrefImageCursor(PlatformCursor cursor) override;
private:
// Get cached BitmapCursorOzone for a default cursor.
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aura.h b/ui/base/dragdrop/os_exchange_data_provider_aura.h
index 0f9163b..b489bcb 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aura.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_aura.h
@@ -23,41 +23,39 @@ class UI_BASE_EXPORT OSExchangeDataProviderAura
: public OSExchangeData::Provider {
public:
OSExchangeDataProviderAura();
- virtual ~OSExchangeDataProviderAura();
+ ~OSExchangeDataProviderAura() override;
// Overridden from OSExchangeData::Provider:
- virtual Provider* Clone() const override;
- virtual void MarkOriginatedFromRenderer() override;
- virtual bool DidOriginateFromRenderer() const override;
- virtual void SetString(const base::string16& data) override;
- virtual void SetURL(const GURL& url, const base::string16& title) override;
- virtual void SetFilename(const base::FilePath& path) override;
- virtual void SetFilenames(const std::vector<FileInfo>& filenames) override;
- virtual void SetPickledData(const OSExchangeData::CustomFormat& format,
- const Pickle& data) override;
- virtual bool GetString(base::string16* data) const override;
- virtual bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
- GURL* url,
- base::string16* title) const override;
- virtual bool GetFilename(base::FilePath* path) const override;
- virtual bool GetFilenames(std::vector<FileInfo>* filenames) const override;
- virtual bool GetPickledData(const OSExchangeData::CustomFormat& format,
- Pickle* data) const override;
- virtual bool HasString() const override;
- virtual bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const
- override;
- virtual bool HasFile() const override;
- virtual bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const
+ Provider* Clone() const override;
+ void MarkOriginatedFromRenderer() override;
+ bool DidOriginateFromRenderer() const override;
+ void SetString(const base::string16& data) override;
+ void SetURL(const GURL& url, const base::string16& title) override;
+ void SetFilename(const base::FilePath& path) override;
+ void SetFilenames(const std::vector<FileInfo>& filenames) override;
+ void SetPickledData(const OSExchangeData::CustomFormat& format,
+ const Pickle& data) override;
+ bool GetString(base::string16* data) const override;
+ bool GetURLAndTitle(OSExchangeData::FilenameToURLPolicy policy,
+ GURL* url,
+ base::string16* title) const override;
+ bool GetFilename(base::FilePath* path) const override;
+ bool GetFilenames(std::vector<FileInfo>* filenames) const override;
+ bool GetPickledData(const OSExchangeData::CustomFormat& format,
+ Pickle* data) const override;
+ bool HasString() const override;
+ bool HasURL(OSExchangeData::FilenameToURLPolicy policy) const override;
+ bool HasFile() const override;
+ bool HasCustomFormat(const OSExchangeData::CustomFormat& format) const
override;
- virtual void SetHtml(const base::string16& html,
- const GURL& base_url) override;
- virtual bool GetHtml(base::string16* html, GURL* base_url) const override;
- virtual bool HasHtml() const override;
- virtual void SetDragImage(const gfx::ImageSkia& image,
- const gfx::Vector2d& cursor_offset) override;
- virtual const gfx::ImageSkia& GetDragImage() const override;
- virtual const gfx::Vector2d& GetDragImageOffset() const override;
+ void SetHtml(const base::string16& html, const GURL& base_url) override;
+ bool GetHtml(base::string16* html, GURL* base_url) const override;
+ bool HasHtml() const override;
+ void SetDragImage(const gfx::ImageSkia& image,
+ const gfx::Vector2d& cursor_offset) override;
+ const gfx::ImageSkia& GetDragImage() const override;
+ const gfx::Vector2d& GetDragImageOffset() const override;
private:
typedef std::map<OSExchangeData::CustomFormat, Pickle> PickleData;
diff --git a/ui/compositor/test/test_compositor_host_ozone.cc b/ui/compositor/test/test_compositor_host_ozone.cc
index b432ab7..f0437d9 100644
--- a/ui/compositor/test/test_compositor_host_ozone.cc
+++ b/ui/compositor/test/test_compositor_host_ozone.cc
@@ -20,12 +20,12 @@ class TestCompositorHostOzone : public TestCompositorHost {
public:
TestCompositorHostOzone(const gfx::Rect& bounds,
ui::ContextFactory* context_factory);
- virtual ~TestCompositorHostOzone();
+ ~TestCompositorHostOzone() override;
private:
// Overridden from TestCompositorHost:
- virtual void Show() override;
- virtual ui::Compositor* GetCompositor() override;
+ void Show() override;
+ ui::Compositor* GetCompositor() override;
void Draw();
diff --git a/ui/events/ozone/evdev/input_controller_evdev.h b/ui/events/ozone/evdev/input_controller_evdev.h
index 05031ce..13b124d 100644
--- a/ui/events/ozone/evdev/input_controller_evdev.h
+++ b/ui/events/ozone/evdev/input_controller_evdev.h
@@ -33,7 +33,7 @@ class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController {
GesturePropertyProvider* gesture_property_provider
#endif
);
- virtual ~InputControllerEvdev();
+ ~InputControllerEvdev() override;
// InputController:
bool HasMouse() override;
diff --git a/ui/events/ozone/evdev/tablet_event_converter_evdev.h b/ui/events/ozone/evdev/tablet_event_converter_evdev.h
index dc57ed8..fa03e12 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev.h
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev.h
@@ -29,7 +29,7 @@ class EVENTS_OZONE_EVDEV_EXPORT TabletEventConverterEvdev
CursorDelegateEvdev* cursor,
const EventDeviceInfo& info,
const EventDispatchCallback& callback);
- virtual ~TabletEventConverterEvdev();
+ ~TabletEventConverterEvdev() override;
// EventConverterEvdev:
void OnFileCanReadWithoutBlocking(int fd) override;
diff --git a/ui/events/ozone/layout/no/no_keyboard_layout_engine.h b/ui/events/ozone/layout/no/no_keyboard_layout_engine.h
index f9cb6fe..00cbda9 100644
--- a/ui/events/ozone/layout/no/no_keyboard_layout_engine.h
+++ b/ui/events/ozone/layout/no/no_keyboard_layout_engine.h
@@ -14,19 +14,19 @@ class EVENTS_OZONE_LAYOUT_EXPORT NoKeyboardLayoutEngine
: public KeyboardLayoutEngine {
public:
NoKeyboardLayoutEngine() {}
- virtual ~NoKeyboardLayoutEngine() {}
+ ~NoKeyboardLayoutEngine() override {}
// KeyboardLayoutEngine overrides:
- virtual bool CanSetCurrentLayout() const override;
- virtual bool SetCurrentLayoutByName(const std::string& layout_name) override;
- virtual bool UsesISOLevel5Shift() const override;
- virtual bool UsesAltGr() const override;
- virtual bool Lookup(DomCode dom_code,
- int flags,
- DomKey* dom_key,
- base::char16* character,
- KeyboardCode* key_code,
- uint32* platform_keycode) const override;
+ bool CanSetCurrentLayout() const override;
+ bool SetCurrentLayoutByName(const std::string& layout_name) override;
+ bool UsesISOLevel5Shift() const override;
+ bool UsesAltGr() const override;
+ bool Lookup(DomCode dom_code,
+ int flags,
+ DomKey* dom_key,
+ base::char16* character,
+ KeyboardCode* key_code,
+ uint32* platform_keycode) const override;
};
} // namespace ui
diff --git a/ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h b/ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h
index cc82c9b..a2d4912 100644
--- a/ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h
+++ b/ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h
@@ -14,19 +14,19 @@ class EVENTS_OZONE_LAYOUT_EXPORT StubKeyboardLayoutEngine
: public KeyboardLayoutEngine {
public:
StubKeyboardLayoutEngine();
- virtual ~StubKeyboardLayoutEngine();
+ ~StubKeyboardLayoutEngine() override;
// KeyboardLayoutEngineOzone:
- virtual bool CanSetCurrentLayout() const override;
- virtual bool SetCurrentLayoutByName(const std::string& layout_name) override;
- virtual bool UsesISOLevel5Shift() const override;
- virtual bool UsesAltGr() const override;
- virtual bool Lookup(DomCode dom_code,
- int flags,
- DomKey* dom_key,
- base::char16* character,
- KeyboardCode* key_code,
- uint32* platform_keycode) const override;
+ bool CanSetCurrentLayout() const override;
+ bool SetCurrentLayoutByName(const std::string& layout_name) override;
+ bool UsesISOLevel5Shift() const override;
+ bool UsesAltGr() const override;
+ bool Lookup(DomCode dom_code,
+ int flags,
+ DomKey* dom_key,
+ base::char16* character,
+ KeyboardCode* key_code,
+ uint32* platform_keycode) const override;
};
} // namespace ui
diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
index ffa416a..eecd064 100644
--- a/ui/gl/gl_surface_ozone.cc
+++ b/ui/gl/gl_surface_ozone.cc
@@ -60,7 +60,7 @@ class GL_EXPORT GLSurfaceOzoneEGL : public NativeViewGLSurfaceEGL {
private:
using NativeViewGLSurfaceEGL::Initialize;
- virtual ~GLSurfaceOzoneEGL() {
+ ~GLSurfaceOzoneEGL() override {
Destroy(); // EGL surface must be destroyed before SurfaceOzone
}
@@ -156,7 +156,7 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
}
private:
- virtual ~GLSurfaceOzoneSurfaceless() {
+ ~GLSurfaceOzoneSurfaceless() override {
Destroy(); // EGL surface must be destroyed before SurfaceOzone
}
diff --git a/ui/ozone/platform/egltest/ozone_platform_egltest.cc b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
index 8b22625..032f81c 100644
--- a/ui/ozone/platform/egltest/ozone_platform_egltest.cc
+++ b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
@@ -200,7 +200,7 @@ class SurfaceOzoneEgltest : public SurfaceOzoneEGL {
: eglplatform_shim_(eglplatform_shim) {
native_window_ = eglplatform_shim_->ShimGetNativeWindow(window_id);
}
- ~SurfaceOzoneEgltest() {
+ ~SurfaceOzoneEgltest() override {
bool ret = eglplatform_shim_->ShimReleaseNativeWindow(native_window_);
DCHECK(ret);
}
@@ -297,7 +297,7 @@ const int32* SurfaceFactoryEgltest::GetEGLSurfaceProperties(
class OzonePlatformEgltest : public OzonePlatform {
public:
OzonePlatformEgltest() : shim_initialized_(false) {}
- virtual ~OzonePlatformEgltest() {
+ ~OzonePlatformEgltest() override {
if (shim_initialized_)
eglplatform_shim_.ShimTerminate();
}
diff --git a/ui/ozone/public/input_controller.cc b/ui/ozone/public/input_controller.cc
index 4e1e6a3..f0eb240 100644
--- a/ui/ozone/public/input_controller.cc
+++ b/ui/ozone/public/input_controller.cc
@@ -14,7 +14,7 @@ namespace {
class StubInputController : public InputController {
public:
StubInputController();
- virtual ~StubInputController();
+ ~StubInputController() override;
// InputController:
bool HasMouse() override;