Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1899)

Unified Diff: mojo/services/native_viewport/platform_viewport_x11.cc

Issue 667223002: Mojo: More virtual/override style fixes in mojo/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/native_viewport/platform_viewport_x11.cc
diff --git a/mojo/services/native_viewport/platform_viewport_x11.cc b/mojo/services/native_viewport/platform_viewport_x11.cc
index b34928e76fb9ee662ba2d464b38c4668ce8215f9..099b31c7f94551db8fbfe5e499a4187201db0374 100644
--- a/mojo/services/native_viewport/platform_viewport_x11.cc
+++ b/mojo/services/native_viewport/platform_viewport_x11.cc
@@ -24,14 +24,14 @@ class PlatformViewportX11 : public PlatformViewport,
explicit PlatformViewportX11(Delegate* delegate) : delegate_(delegate) {
}
- virtual ~PlatformViewportX11() {
+ ~PlatformViewportX11() override {
// Destroy the platform-window while |this| is still alive.
platform_window_.reset();
}
private:
// Overridden from PlatformViewport:
- virtual void Init(const gfx::Rect& bounds) override {
+ void Init(const gfx::Rect& bounds) override {
CHECK(!event_source_);
CHECK(!platform_window_);
@@ -41,44 +41,31 @@ class PlatformViewportX11 : public PlatformViewport,
platform_window_->SetBounds(bounds);
}
- virtual void Show() override {
- platform_window_->Show();
- }
+ void Show() override { platform_window_->Show(); }
- virtual void Hide() override {
- platform_window_->Hide();
- }
+ void Hide() override { platform_window_->Hide(); }
- virtual void Close() override {
- platform_window_->Close();
- }
+ void Close() override { platform_window_->Close(); }
- virtual gfx::Size GetSize() override {
- return bounds_.size();
- }
+ gfx::Size GetSize() override { return bounds_.size(); }
- virtual void SetBounds(const gfx::Rect& bounds) override {
+ void SetBounds(const gfx::Rect& bounds) override {
platform_window_->SetBounds(bounds);
}
- virtual void SetCapture() override {
- platform_window_->SetCapture();
- }
+ void SetCapture() override { platform_window_->SetCapture(); }
- virtual void ReleaseCapture() override {
- platform_window_->ReleaseCapture();
- }
+ void ReleaseCapture() override { platform_window_->ReleaseCapture(); }
// ui::PlatformWindowDelegate:
- virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override {
+ void OnBoundsChanged(const gfx::Rect& new_bounds) override {
bounds_ = new_bounds;
delegate_->OnBoundsChanged(new_bounds);
}
- virtual void OnDamageRect(const gfx::Rect& damaged_region) override {
- }
+ void OnDamageRect(const gfx::Rect& damaged_region) override {}
- virtual void DispatchEvent(ui::Event* event) override {
+ void DispatchEvent(ui::Event* event) override {
delegate_->OnEvent(event);
// We want to emulate the WM_CHAR generation behaviour of Windows.
@@ -113,26 +100,19 @@ class PlatformViewportX11 : public PlatformViewport,
}
}
- virtual void OnCloseRequest() override {
- platform_window_->Close();
- }
+ void OnCloseRequest() override { platform_window_->Close(); }
- virtual void OnClosed() override {
- delegate_->OnDestroyed();
- }
+ void OnClosed() override { delegate_->OnDestroyed(); }
- virtual void OnWindowStateChanged(ui::PlatformWindowState state) override {
- }
+ void OnWindowStateChanged(ui::PlatformWindowState state) override {}
- virtual void OnLostCapture() override {
- }
+ void OnLostCapture() override {}
- virtual void OnAcceleratedWidgetAvailable(
- gfx::AcceleratedWidget widget) override {
+ void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override {
delegate_->OnAcceleratedWidgetAvailable(widget);
}
- virtual void OnActivationChanged(bool active) override {}
+ void OnActivationChanged(bool active) override {}
scoped_ptr<ui::PlatformEventSource> event_source_;
scoped_ptr<ui::PlatformWindow> platform_window_;
« no previous file with comments | « mojo/public/python/src/python_system_helper.cc ('k') | mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698