Commit b0373167 authored by dcheng's avatar dcheng Committed by Commit bot

Standardize usage of virtual/override/final specifiers.

The Google C++ style guide states:

  Explicitly annotate overrides of virtual functions or virtual
  destructors with an override or (less frequently) final specifier.
  Older (pre-C++11) code will use the virtual keyword as an inferior
  alternative annotation. For clarity, use exactly one of override,
  final, or virtual when declaring an override.

To better conform to these guidelines, the following constructs have
been rewritten:

- if a base class has a virtual destructor, then:
    virtual ~Foo();                   ->  ~Foo() override;
- virtual void Foo() override;        ->  void Foo() override;
- virtual void Foo() override final;  ->  void Foo() final;

This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.

BUG=417463
R=avi@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#301448}
parent a74e3540
......@@ -35,13 +35,13 @@ namespace views {
class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient {
public:
explicit DesktopCaptureClient(aura::Window* root);
virtual ~DesktopCaptureClient();
~DesktopCaptureClient() override;
// Overridden from aura::client::CaptureClient:
virtual void SetCapture(aura::Window* window) override;
virtual void ReleaseCapture(aura::Window* window) override;
virtual aura::Window* GetCaptureWindow() override;
virtual aura::Window* GetGlobalCaptureWindow() override;
void SetCapture(aura::Window* window) override;
void ReleaseCapture(aura::Window* window) override;
aura::Window* GetCaptureWindow() override;
aura::Window* GetGlobalCaptureWindow() override;
private:
typedef std::set<DesktopCaptureClient*> CaptureClients;
......
......@@ -14,13 +14,12 @@ namespace views {
class DesktopCursorLoaderUpdaterAuraLinux : public DesktopCursorLoaderUpdater {
public:
DesktopCursorLoaderUpdaterAuraLinux();
virtual ~DesktopCursorLoaderUpdaterAuraLinux();
~DesktopCursorLoaderUpdaterAuraLinux() override;
// Overridden from DesktopCursorLoaderUpdater:
virtual void OnCreate(float device_scale_factor,
void OnCreate(float device_scale_factor, ui::CursorLoader* loader) override;
void OnDisplayUpdated(const gfx::Display& display,
ui::CursorLoader* loader) override;
virtual void OnDisplayUpdated(const gfx::Display& display,
ui::CursorLoader* loader) override;
};
} // namespace views
......
......@@ -17,12 +17,11 @@ class VIEWS_EXPORT DesktopDispatcherClient
: public aura::client::DispatcherClient {
public:
DesktopDispatcherClient();
virtual ~DesktopDispatcherClient();
~DesktopDispatcherClient() override;
virtual void PrepareNestedLoopClosures(
base::MessagePumpDispatcher* dispatcher,
base::Closure* run_closure,
base::Closure* quit_closure) override;
void PrepareNestedLoopClosures(base::MessagePumpDispatcher* dispatcher,
base::Closure* run_closure,
base::Closure* quit_closure) override;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopDispatcherClient);
......
......@@ -108,7 +108,7 @@ class DesktopDragDropClientAuraX11::X11DragContext
X11DragContext(ui::X11AtomCache* atom_cache,
::Window local_window,
const XClientMessageEvent& event);
virtual ~X11DragContext();
~X11DragContext() override;
// When we receive an XdndPosition message, we need to have all the data
// copied from the other window before we process the XdndPosition
......@@ -144,8 +144,8 @@ class DesktopDragDropClientAuraX11::X11DragContext
void MaskOperation(::Atom xdnd_operation, int* drag_operation) const;
// ui::PlatformEventDispatcher:
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// The atom cache owned by our parent.
ui::X11AtomCache* atom_cache_;
......
......@@ -59,7 +59,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
views::DesktopNativeCursorManager* cursor_manager,
Display* xdisplay,
::Window xwindow);
virtual ~DesktopDragDropClientAuraX11();
~DesktopDragDropClientAuraX11() override;
// We maintain a mapping of live DesktopDragDropClientAuraX11 objects to
// their ::Windows. We do this so that we're able to short circuit sending
......@@ -80,27 +80,24 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
void OnSelectionNotify(const XSelectionEvent& xselection);
// Overridden from aura::client::DragDropClient:
virtual int StartDragAndDrop(
const ui::OSExchangeData& data,
aura::Window* root_window,
aura::Window* source_window,
const gfx::Point& root_location,
int operation,
ui::DragDropTypes::DragEventSource source) override;
virtual void DragUpdate(aura::Window* target,
const ui::LocatedEvent& event) override;
virtual void Drop(aura::Window* target,
const ui::LocatedEvent& event) override;
virtual void DragCancel() override;
virtual bool IsDragDropInProgress() override;
int StartDragAndDrop(const ui::OSExchangeData& data,
aura::Window* root_window,
aura::Window* source_window,
const gfx::Point& root_location,
int operation,
ui::DragDropTypes::DragEventSource source) override;
void DragUpdate(aura::Window* target, const ui::LocatedEvent& event) override;
void Drop(aura::Window* target, const ui::LocatedEvent& event) override;
void DragCancel() override;
bool IsDragDropInProgress() override;
// Overridden from aura::WindowObserver:
virtual void OnWindowDestroyed(aura::Window* window) override;
void OnWindowDestroyed(aura::Window* window) override;
// Overridden from X11WholeScreenMoveLoopDelegate:
virtual void OnMouseMovement(XMotionEvent* event) override;
virtual void OnMouseReleased() override;
virtual void OnMoveLoopEnded() override;
void OnMouseMovement(XMotionEvent* event) override;
void OnMouseReleased() override;
void OnMoveLoopEnded() override;
protected:
// The following methods are virtual for the sake of testing.
......
......@@ -80,16 +80,15 @@ class ClientMessageEventCollector {
class TestMoveLoop : public X11MoveLoop {
public:
explicit TestMoveLoop(X11MoveLoopDelegate* delegate);
virtual ~TestMoveLoop();
~TestMoveLoop() override;
// Returns true if the move loop is running.
bool IsRunning() const;
// X11MoveLoop:
virtual bool RunMoveLoop(aura::Window* window,
gfx::NativeCursor cursor) override;
virtual void UpdateCursor(gfx::NativeCursor cursor) override;
virtual void EndMoveLoop() override;
bool RunMoveLoop(aura::Window* window, gfx::NativeCursor cursor) override;
void UpdateCursor(gfx::NativeCursor cursor) override;
void EndMoveLoop() override;
private:
// Not owned.
......@@ -112,7 +111,7 @@ class TestDragDropClient : public DesktopDragDropClientAuraX11 {
TestDragDropClient(aura::Window* window,
DesktopNativeCursorManager* cursor_manager);
virtual ~TestDragDropClient();
~TestDragDropClient() override;
// Returns the XID of the window which initiated the drag.
::Window source_xwindow() {
......@@ -152,10 +151,10 @@ class TestDragDropClient : public DesktopDragDropClientAuraX11 {
private:
// DesktopDragDropClientAuraX11:
virtual scoped_ptr<X11MoveLoop> CreateMoveLoop(
scoped_ptr<X11MoveLoop> CreateMoveLoop(
X11MoveLoopDelegate* delegate) override;
virtual ::Window FindWindowFor(const gfx::Point& screen_point) override;
virtual void SendXClientEvent(::Window xid, XEvent* event) override;
::Window FindWindowFor(const gfx::Point& screen_point) override;
void SendXClientEvent(::Window xid, XEvent* event) override;
// The XID of the window which initiated the drag.
::Window source_xid_;
......@@ -349,8 +348,7 @@ class DesktopDragDropClientAuraX11Test : public ViewsTestBase {
DesktopDragDropClientAuraX11Test() {
}
virtual ~DesktopDragDropClientAuraX11Test() {
}
~DesktopDragDropClientAuraX11Test() override {}
int StartDragAndDrop() {
ui::OSExchangeData data;
......@@ -366,7 +364,7 @@ class DesktopDragDropClientAuraX11Test : public ViewsTestBase {
}
// ViewsTestBase:
virtual void SetUp() override {
void SetUp() override {
ViewsTestBase::SetUp();
// Create widget to initiate the drags.
......@@ -386,7 +384,7 @@ class DesktopDragDropClientAuraX11Test : public ViewsTestBase {
client_->Init();
}
virtual void TearDown() override {
void TearDown() override {
client_.reset();
cursor_manager_.reset();
widget_.reset();
......
......@@ -15,12 +15,11 @@ namespace views {
class VIEWS_EXPORT DesktopEventClient : public aura::client::EventClient {
public:
DesktopEventClient();
virtual ~DesktopEventClient();
~DesktopEventClient() override;
// Overridden from aura::client::EventClient:
virtual bool CanProcessEventsWithinSubtree(
const aura::Window* window) const override;
virtual ui::EventTarget* GetToplevelEventTarget() override;
bool CanProcessEventsWithinSubtree(const aura::Window* window) const override;
ui::EventTarget* GetToplevelEventTarget() override;
private:
DISALLOW_COPY_AND_ASSIGN(DesktopEventClient);
......
......@@ -12,17 +12,16 @@ namespace views {
class DesktopFocusRules : public wm::BaseFocusRules {
public:
explicit DesktopFocusRules(aura::Window* content_window);
virtual ~DesktopFocusRules();
~DesktopFocusRules() override;
private:
// Overridden from wm::BaseFocusRules:
virtual bool CanActivateWindow(aura::Window* window) const override;
virtual bool SupportsChildActivation(aura::Window* window) const override;
virtual bool IsWindowConsideredVisibleForActivation(
aura::Window* window) const override;
virtual aura::Window* GetToplevelWindow(aura::Window* window) const override;
virtual aura::Window* GetNextActivatableWindow(
bool CanActivateWindow(aura::Window* window) const override;
bool SupportsChildActivation(aura::Window* window) const override;
bool IsWindowConsideredVisibleForActivation(
aura::Window* window) const override;
aura::Window* GetToplevelWindow(aura::Window* window) const override;
aura::Window* GetNextActivatableWindow(aura::Window* window) const override;
// The content window. This is an activatable window even though it is a
// child.
......
......@@ -35,7 +35,7 @@ class VIEWS_EXPORT DesktopNativeCursorManager
public:
DesktopNativeCursorManager(
scoped_ptr<DesktopCursorLoaderUpdater> cursor_loader_updater);
virtual ~DesktopNativeCursorManager();
~DesktopNativeCursorManager() override;
// Builds a cursor and sets the internal platform representation.
gfx::NativeCursor GetInitializedCursor(int type);
......@@ -48,19 +48,15 @@ class VIEWS_EXPORT DesktopNativeCursorManager
private:
// Overridden from wm::NativeCursorManager:
virtual void SetDisplay(
const gfx::Display& display,
wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetCursor(
gfx::NativeCursor cursor,
wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetVisibility(
bool visible,
wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetCursorSet(
ui::CursorSetType cursor_set,
wm::NativeCursorManagerDelegate* delegate) override;
virtual void SetMouseEventsEnabled(
void SetDisplay(const gfx::Display& display,
wm::NativeCursorManagerDelegate* delegate) override;
void SetCursor(gfx::NativeCursor cursor,
wm::NativeCursorManagerDelegate* delegate) override;
void SetVisibility(bool visible,
wm::NativeCursorManagerDelegate* delegate) override;
void SetCursorSet(ui::CursorSetType cursor_set,
wm::NativeCursorManagerDelegate* delegate) override;
void SetMouseEventsEnabled(
bool enabled,
wm::NativeCursorManagerDelegate* delegate) override;
......
......@@ -118,7 +118,7 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver {
}
// aura::WindowObserver overrides
virtual void OnWindowDestroying(aura::Window* window) override {
void OnWindowDestroying(aura::Window* window) override {
window->RemoveObserver(this);
// If the widget is being destroyed by the OS then we should not try and
......@@ -141,9 +141,9 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver {
delete this;
}
virtual void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override {
void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override {
if (top_level_widget_ && window == child_window_)
top_level_widget_->SetSize(new_bounds.size());
}
......@@ -153,7 +153,7 @@ class DesktopNativeWidgetTopLevelHandler : public aura::WindowObserver {
: top_level_widget_(NULL),
child_window_(NULL) {}
virtual ~DesktopNativeWidgetTopLevelHandler() {}
~DesktopNativeWidgetTopLevelHandler() override {}
Widget* top_level_widget_;
aura::Window* child_window_;
......@@ -169,14 +169,14 @@ class DesktopNativeWidgetAuraWindowTreeClient :
: root_window_(root_window) {
aura::client::SetWindowTreeClient(root_window_, this);
}
virtual ~DesktopNativeWidgetAuraWindowTreeClient() {
~DesktopNativeWidgetAuraWindowTreeClient() override {
aura::client::SetWindowTreeClient(root_window_, NULL);
}
// Overridden from client::WindowTreeClient:
virtual aura::Window* GetDefaultParent(aura::Window* context,
aura::Window* window,
const gfx::Rect& bounds) override {
aura::Window* GetDefaultParent(aura::Window* context,
aura::Window* window,
const gfx::Rect& bounds) override {
bool is_fullscreen = window->GetProperty(aura::client::kShowStateKey) ==
ui::SHOW_STATE_FULLSCREEN;
bool is_menu = window->type() == ui::wm::WINDOW_TYPE_MENU;
......@@ -208,7 +208,7 @@ class FocusManagerEventHandler : public ui::EventHandler {
: desktop_native_widget_aura_(desktop_native_widget_aura) {}
// Implementation of ui::EventHandler:
virtual void OnKeyEvent(ui::KeyEvent* event) override {
void OnKeyEvent(ui::KeyEvent* event) override {
Widget* widget = desktop_native_widget_aura_->GetWidget();
if (widget && widget->GetFocusManager()->GetFocusedView() &&
!widget->GetFocusManager()->OnKeyEvent(*event)) {
......@@ -226,11 +226,11 @@ class RootWindowDestructionObserver : public aura::WindowObserver {
public:
explicit RootWindowDestructionObserver(DesktopNativeWidgetAura* parent)
: parent_(parent) {}
virtual ~RootWindowDestructionObserver() {}
~RootWindowDestructionObserver() override {}
private:
// Overridden from aura::WindowObserver:
virtual void OnWindowDestroyed(aura::Window* window) override {
void OnWindowDestroyed(aura::Window* window) override {
parent_->RootWindowDestroyed();
window->RemoveObserver(this);
delete this;
......
......@@ -251,7 +251,7 @@ class DesktopAuraTopLevelWindowTest
owner_destroyed_(false),
owned_window_destroyed_(false) {}
virtual ~DesktopAuraTopLevelWindowTest() {
~DesktopAuraTopLevelWindowTest() override {
EXPECT_TRUE(owner_destroyed_);
EXPECT_TRUE(owned_window_destroyed_);
top_level_widget_ = NULL;
......@@ -259,9 +259,8 @@ class DesktopAuraTopLevelWindowTest
}
// views::TestViewsDelegate overrides.
virtual void OnBeforeWidgetInit(
Widget::InitParams* params,
internal::NativeWidgetDelegate* delegate) override {
void OnBeforeWidgetInit(Widget::InitParams* params,
internal::NativeWidgetDelegate* delegate) override {
if (!params->native_widget)
params->native_widget = new views::DesktopNativeWidgetAura(delegate);
}
......@@ -311,7 +310,7 @@ class DesktopAuraTopLevelWindowTest
top_level_widget_->CloseNow();
}
virtual void OnWindowDestroying(aura::Window* window) override {
void OnWindowDestroying(aura::Window* window) override {
window->RemoveObserver(this);
if (window == owned_window_) {
owned_window_destroyed_ = true;
......
......@@ -16,18 +16,18 @@ class VIEWS_EXPORT DesktopScreenPositionClient
: public aura::client::ScreenPositionClient {
public:
explicit DesktopScreenPositionClient(aura::Window* root_window);
virtual ~DesktopScreenPositionClient();
~DesktopScreenPositionClient() override;
// aura::client::ScreenPositionClient overrides:
virtual void ConvertPointToScreen(const aura::Window* window,
gfx::Point* point) override;
virtual void ConvertPointFromScreen(const aura::Window* window,
gfx::Point* point) override;
virtual void ConvertHostPointToScreen(aura::Window* window,
gfx::Point* point) override;
virtual void SetBounds(aura::Window* window,
const gfx::Rect& bounds,
const gfx::Display& display) override;
void ConvertPointToScreen(const aura::Window* window,
gfx::Point* point) override;
void ConvertPointFromScreen(const aura::Window* window,
gfx::Point* point) override;
void ConvertHostPointToScreen(aura::Window* window,
gfx::Point* point) override;
void SetBounds(aura::Window* window,
const gfx::Rect& bounds,
const gfx::Display& display) override;
private:
aura::Window* root_window_;
......
......@@ -28,28 +28,24 @@ class VIEWS_EXPORT DesktopScreenX11 : public gfx::Screen,
public:
DesktopScreenX11();
virtual ~DesktopScreenX11();
~DesktopScreenX11() override;
// Overridden from gfx::Screen:
virtual gfx::Point GetCursorScreenPoint() override;
virtual gfx::NativeWindow GetWindowUnderCursor() override;
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
override;
virtual int GetNumDisplays() const override;
virtual std::vector<gfx::Display> GetAllDisplays() const override;
virtual gfx::Display GetDisplayNearestWindow(
gfx::NativeView window) const override;
virtual gfx::Display GetDisplayNearestPoint(
const gfx::Point& point) const override;
virtual gfx::Display GetDisplayMatching(
const gfx::Rect& match_rect) const override;
virtual gfx::Display GetPrimaryDisplay() const override;
virtual void AddObserver(gfx::DisplayObserver* observer) override;
virtual void RemoveObserver(gfx::DisplayObserver* observer) override;
gfx::Point GetCursorScreenPoint() override;
gfx::NativeWindow GetWindowUnderCursor() override;
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override;
int GetNumDisplays() const override;
std::vector<gfx::Display> GetAllDisplays() const override;
gfx::Display GetDisplayNearestWindow(gfx::NativeView window) const override;
gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override;
gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override;
gfx::Display GetPrimaryDisplay() const override;
void AddObserver(gfx::DisplayObserver* observer) override;
void RemoveObserver(gfx::DisplayObserver* observer) override;
// ui::PlatformEventDispatcher:
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
private:
friend class DesktopScreenX11Test;
......
......@@ -27,14 +27,14 @@ class TestDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura {
explicit TestDesktopNativeWidgetAura(
views::internal::NativeWidgetDelegate* delegate)
: views::DesktopNativeWidgetAura(delegate) {}
virtual ~TestDesktopNativeWidgetAura() {}
~TestDesktopNativeWidgetAura() override {}
void set_window_component(int window_component) {
window_component_ = window_component;
}
// DesktopNativeWidgetAura:
virtual int GetNonClientComponent(const gfx::Point& point) const override {
int GetNonClientComponent(const gfx::Point& point) const override {
return window_component_;
}
......@@ -55,10 +55,10 @@ class DesktopScreenX11Test : public views::ViewsTestBase,
public gfx::DisplayObserver {
public:
DesktopScreenX11Test() {}
virtual ~DesktopScreenX11Test() {}
~DesktopScreenX11Test() override {}
// Overridden from testing::Test:
virtual void SetUp() override {
void SetUp() override {
ViewsTestBase::SetUp();
// Initialize the world to the single monitor case.
std::vector<gfx::Display> displays;
......@@ -67,7 +67,7 @@ class DesktopScreenX11Test : public views::ViewsTestBase,
screen_->AddObserver(this);
}
virtual void TearDown() override {
void TearDown() override {
screen_.reset();
ViewsTestBase::TearDown();
}
......@@ -111,16 +111,16 @@ class DesktopScreenX11Test : public views::ViewsTestBase,
private:
// Overridden from gfx::DisplayObserver:
virtual void OnDisplayAdded(const gfx::Display& new_display) override {
void OnDisplayAdded(const gfx::Display& new_display) override {
added_display_.push_back(new_display);
}
virtual void OnDisplayRemoved(const gfx::Display& old_display) override {
void OnDisplayRemoved(const gfx::Display& old_display) override {
removed_display_.push_back(old_display);
}
virtual void OnDisplayMetricsChanged(const gfx::Display& display,
uint32_t metrics) override {
void OnDisplayMetricsChanged(const gfx::Display& display,
uint32_t metrics) override {
changed_display_.push_back(display);
}
......
......@@ -48,7 +48,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
DesktopWindowTreeHostX11(
internal::NativeWidgetDelegate* native_widget_delegate,
DesktopNativeWidgetAura* desktop_native_widget_aura);
virtual ~DesktopWindowTreeHostX11();
~DesktopWindowTreeHostX11() override;
// A way of converting an X11 |xid| host window into a |content_window_|.
static aura::Window* GetContentWindowForXID(XID xid);
......@@ -87,84 +87,82 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
protected:
// Overridden from DesktopWindowTreeHost:
virtual void Init(aura::Window* content_window,
const Widget::InitParams& params) override;
virtual void OnNativeWidgetCreated(const Widget::InitParams& params) override;
virtual scoped_ptr<corewm::Tooltip> CreateTooltip() override;
virtual scoped_ptr<aura::client::DragDropClient>
CreateDragDropClient(DesktopNativeCursorManager* cursor_manager) override;
virtual void Close() override;
virtual void CloseNow() override;
virtual aura::WindowTreeHost* AsWindowTreeHost() override;
virtual void ShowWindowWithState(ui::WindowShowState show_state) override;
virtual void ShowMaximizedWithBounds(
const gfx::Rect& restored_bounds) override;
virtual bool IsVisible() const override;
virtual void SetSize(const gfx::Size& requested_size) override;
virtual void StackAtTop() override;
virtual void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const override;
virtual gfx::Rect GetWindowBoundsInScreen() const override;
virtual gfx::Rect GetClientAreaBoundsInScreen() const override;
virtual gfx::Rect GetRestoredBounds() const override;
virtual gfx::Rect GetWorkAreaBoundsInScreen() const override;
virtual void SetShape(gfx::NativeRegion native_region) override;
virtual void Activate() override;
virtual void Deactivate() override;
virtual bool IsActive() const override;
virtual void Maximize() override;
virtual void Minimize() override;
virtual void Restore() override;
virtual bool IsMaximized() const override;
virtual bool IsMinimized() const override;
virtual bool HasCapture() const override;
virtual void SetAlwaysOnTop(bool always_on_top) override;
virtual bool IsAlwaysOnTop() const override;
virtual void SetVisibleOnAllWorkspaces(bool always_visible) override;
virtual bool SetWindowTitle(const base::string16& title) override;
virtual void ClearNativeFocus() override;
virtual Widget::MoveLoopResult RunMoveLoop(
void Init(aura::Window* content_window,
const Widget::InitParams& params) override;
void OnNativeWidgetCreated(const Widget::InitParams& params) override;
scoped_ptr<corewm::Tooltip> CreateTooltip() override;
scoped_ptr<aura::client::DragDropClient> CreateDragDropClient(
DesktopNativeCursorManager* cursor_manager) override;
void Close() override;
void CloseNow() override;
aura::WindowTreeHost* AsWindowTreeHost() override;
void ShowWindowWithState(ui::WindowShowState show_state) override;
void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override;
bool IsVisible() const override;
void SetSize(const gfx::Size& requested_size) override;
void StackAtTop() override;
void CenterWindow(const gfx::Size& size) override;
void GetWindowPlacement(gfx::Rect* bounds,
ui::WindowShowState* show_state) const override;
gfx::Rect GetWindowBoundsInScreen() const override;
gfx::Rect GetClientAreaBoundsInScreen() const override;
gfx::Rect GetRestoredBounds() const override;
gfx::Rect GetWorkAreaBoundsInScreen() const override;
void SetShape(gfx::NativeRegion native_region) override;
void Activate() override;
void Deactivate() override;
bool IsActive() const override;
void Maximize() override;
void Minimize() override;
void Restore() override;
bool IsMaximized() const override;
bool IsMinimized() const override;
bool HasCapture() const override;
void SetAlwaysOnTop(bool always_on_top) override;
bool IsAlwaysOnTop() const override;
void SetVisibleOnAllWorkspaces(bool always_visible) override;
bool SetWindowTitle(const base::string16& title) override;
void ClearNativeFocus() override;
Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) override;
virtual void EndMoveLoop() override;
virtual void SetVisibilityChangedAnimationsEnabled(bool value) override;
virtual bool ShouldUseNativeFrame() const override;
virtual bool ShouldWindowContentsBeTransparent() const override;
virtual void FrameTypeChanged() override;
virtual void SetFullscreen(bool fullscreen) override;
virtual bool IsFullscreen() const override;
virtual void SetOpacity(unsigned char opacity) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon,
const gfx::ImageSkia& app_icon) override;
virtual void InitModalType(ui::ModalType modal_type) override;
virtual void FlashFrame(bool flash_frame) override;
virtual void OnRootViewLayout() override;
virtual void OnNativeWidgetFocus() override;
virtual void OnNativeWidgetBlur() override;
virtual bool IsAnimatingClosed() const override;
virtual bool IsTranslucentWindowOpacitySupported() const override;
virtual void SizeConstraintsChanged() override;
void EndMoveLoop() override;
void SetVisibilityChangedAnimationsEnabled(bool value) override;
bool ShouldUseNativeFrame() const override;
bool ShouldWindowContentsBeTransparent() const override;
void FrameTypeChanged() override;
void SetFullscreen(bool fullscreen) override;
bool IsFullscreen() const override;
void SetOpacity(unsigned char opacity) override;
void SetWindowIcons(const gfx::ImageSkia& window_icon,
const gfx::ImageSkia& app_icon) override;
void InitModalType(ui::ModalType modal_type) override;
void FlashFrame(bool flash_frame) override;
void OnRootViewLayout() override;
void OnNativeWidgetFocus() override;
void OnNativeWidgetBlur() override;
bool IsAnimatingClosed() const override;
bool IsTranslucentWindowOpacitySupported() const override;
void SizeConstraintsChanged() override;
// Overridden from aura::WindowTreeHost:
virtual ui::EventSource* GetEventSource() override;
virtual gfx::AcceleratedWidget GetAcceleratedWidget() override;
virtual void Show() override;
virtual void Hide() override;
virtual gfx::Rect GetBounds() const override;
virtual void SetBounds(const gfx::Rect& requested_bounds) override;
virtual gfx::Point GetLocationOnNativeScreen() const override;
virtual void SetCapture() override;
virtual void ReleaseCapture() override;
virtual void PostNativeEvent(const base::NativeEvent& native_event) override;
virtual void SetCursorNative(gfx::NativeCursor cursor) 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;
gfx::Rect GetBounds() const override;
void SetBounds(const gfx::Rect& requested_bounds) override;
gfx::Point GetLocationOnNativeScreen() const override;
void SetCapture() override;
void ReleaseCapture() override;
void PostNativeEvent(const base::NativeEvent& native_event) override;
void SetCursorNative(gfx::NativeCursor cursor) override;
void MoveCursorToNative(const gfx::Point& location) override;
void OnCursorVisibilityChangedNative(bool show) override;
// Overridden frm ui::EventSource
virtual ui::EventProcessor* GetEventProcessor() override;
ui::EventProcessor* GetEventProcessor() override;
private:
// Initializes our X11 surface to draw on. This method performs all
......@@ -235,8 +233,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11
void Relayout();
// ui::PlatformEventDispatcher:
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
void DelayedResize(const gfx::Size& size);
......
......@@ -39,12 +39,11 @@ class ActivationWaiter : public X11PropertyChangeWaiter {
window_(window) {
}
virtual ~ActivationWaiter() {
}
~ActivationWaiter() override {}
private:
// X11PropertyChangeWaiter:
virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
XID xid = 0;
ui::GetXIDProperty(ui::GetX11RootWindow(), "_NET_ACTIVE_WINDOW", &xid);
return xid != window_;
......@@ -60,11 +59,10 @@ class MouseMoveCounterHandler : public ui::EventHandler {
public:
MouseMoveCounterHandler() : count_(0) {
}
virtual ~MouseMoveCounterHandler() {
}
~MouseMoveCounterHandler() override {}
// ui::EventHandler:
virtual void OnMouseEvent(ui::MouseEvent* event) override {
void OnMouseEvent(ui::MouseEvent* event) override {
if (event->type() == ui::ET_MOUSE_MOVED)
++count_;
}
......@@ -123,8 +121,7 @@ class DesktopWindowTreeHostX11Test : public ViewsTestBase {
public:
DesktopWindowTreeHostX11Test() {
}
virtual ~DesktopWindowTreeHostX11Test() {
}
~DesktopWindowTreeHostX11Test() override {}
static void SetUpTestCase() {
gfx::GLSurface::InitializeOneOffForTests();
......@@ -135,7 +132,7 @@ class DesktopWindowTreeHostX11Test : public ViewsTestBase {
}
// testing::Test
virtual void SetUp() override {
void SetUp() override {
ViewsTestBase::SetUp();
// Make X11 synchronous for our display connection. This does not force the
......@@ -143,7 +140,7 @@ class DesktopWindowTreeHostX11Test : public ViewsTestBase {
XSynchronize(gfx::GetXDisplay(), True);
}
virtual void TearDown() override {
void TearDown() override {
XSynchronize(gfx::GetXDisplay(), False);
ViewsTestBase::TearDown();
}
......
......@@ -49,12 +49,11 @@ class WMStateWaiter : public X11PropertyChangeWaiter {
atom_cache_.reset(new ui::X11AtomCache(gfx::GetXDisplay(), kAtomsToCache));
}
virtual ~WMStateWaiter() {
}
~WMStateWaiter() override {}
private:
// X11PropertyChangeWaiter:
virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<Atom> hints;
if (ui::GetAtomArrayProperty(xwindow(), "_NET_WM_STATE", &hints)) {
std::vector<Atom>::iterator it = std::find(
......@@ -84,22 +83,16 @@ class ShapedNonClientFrameView : public NonClientFrameView {
explicit ShapedNonClientFrameView() {
}
virtual ~ShapedNonClientFrameView() {
}
~ShapedNonClientFrameView() override {}
// NonClientFrameView:
virtual gfx::Rect GetBoundsForClientView() const override {
return bounds();
}
virtual gfx::Rect GetWindowBoundsForClientBounds(
gfx::Rect GetBoundsForClientView() const override { return bounds(); }
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override {
return client_bounds;
}
virtual int NonClientHitTest(const gfx::Point& point) override {
return HTNOWHERE;
}
virtual void GetWindowMask(const gfx::Size& size,
gfx::Path* window_mask) override {
int NonClientHitTest(const gfx::Point& point) override { return HTNOWHERE; }
void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override {
int right = size.width();
int bottom = size.height();
......@@ -111,14 +104,10 @@ class ShapedNonClientFrameView : public NonClientFrameView {
window_mask->lineTo(right - 10, 0);
window_mask->close();
}
virtual void ResetWindowControls() override {
}
virtual void UpdateWindowIcon() override {
}
virtual void UpdateWindowTitle() override {
}
virtual void SizeConstraintsChanged() override {
}
void ResetWindowControls() override {}
void UpdateWindowIcon() override {}
void UpdateWindowTitle() override {}
void SizeConstraintsChanged() override {}
private:
DISALLOW_COPY_AND_ASSIGN(ShapedNonClientFrameView);
......@@ -129,12 +118,10 @@ class ShapedWidgetDelegate : public WidgetDelegateView {
ShapedWidgetDelegate() {
}
virtual ~ShapedWidgetDelegate() {
}
~ShapedWidgetDelegate() override {}
// WidgetDelegateView:
virtual NonClientFrameView* CreateNonClientFrameView(
Widget* widget) override {
NonClientFrameView* CreateNonClientFrameView(Widget* widget) override {
return new ShapedNonClientFrameView;
}
......@@ -202,10 +189,9 @@ class DesktopWindowTreeHostX11Test : public ViewsTestBase {
public:
DesktopWindowTreeHostX11Test() {
}
virtual ~DesktopWindowTreeHostX11Test() {
}
~DesktopWindowTreeHostX11Test() override {}
virtual void SetUp() override {
void SetUp() override {
ViewsTestBase::SetUp();
// Make X11 synchronous for our display connection. This does not force the
......@@ -213,7 +199,7 @@ class DesktopWindowTreeHostX11Test : public ViewsTestBase {
XSynchronize(gfx::GetXDisplay(), True);
}
virtual void TearDown() override {
void TearDown() override {
XSynchronize(gfx::GetXDisplay(), False);
ViewsTestBase::TearDown();
}
......
......@@ -57,12 +57,12 @@ class VIEWS_EXPORT X11DesktopHandler : public ui::PlatformEventDispatcher,
void ProcessXEvent(XEvent* event);
// ui::PlatformEventDispatcher
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// Overridden from aura::EnvObserver:
virtual void OnWindowInitialized(aura::Window* window) override;
virtual void OnWillDestroyEnv() override;
void OnWindowInitialized(aura::Window* window) override;
void OnWillDestroyEnv() override;
private:
enum ActiveState {
......@@ -71,7 +71,7 @@ class VIEWS_EXPORT X11DesktopHandler : public ui::PlatformEventDispatcher,
};
X11DesktopHandler();
virtual ~X11DesktopHandler();
~X11DesktopHandler() override;
// Handles changes in activation.
void OnActiveWindowChanged(::Window window, ActiveState active_state);
......
......@@ -28,19 +28,19 @@ class VIEWS_EXPORT X11DesktopWindowMoveClient :
public aura::client::WindowMoveClient {
public:
X11DesktopWindowMoveClient();
virtual ~X11DesktopWindowMoveClient();
~X11DesktopWindowMoveClient() override;
// Overridden from X11WholeScreenMoveLoopDelegate:
virtual void OnMouseMovement(XMotionEvent* event) override;
virtual void OnMouseReleased() override;
virtual void OnMoveLoopEnded() override;
void OnMouseMovement(XMotionEvent* event) override;
void OnMouseReleased() override;
void OnMoveLoopEnded() override;
// Overridden from aura::client::WindowMoveClient:
virtual aura::client::WindowMoveResult RunMoveLoop(
aura::client::WindowMoveResult RunMoveLoop(
aura::Window* window,
const gfx::Vector2d& drag_offset,
aura::client::WindowMoveSource move_source) override;
virtual void EndMoveLoop() override;
void EndMoveLoop() override;
private:
X11WholeScreenMoveLoop move_loop_;
......
......@@ -22,7 +22,7 @@ class VIEWS_EXPORT X11TopmostWindowFinder
: public ui::EnumerateWindowsDelegate {
public:
X11TopmostWindowFinder();
virtual ~X11TopmostWindowFinder();
~X11TopmostWindowFinder() override;
// Returns the topmost window at |screen_loc|, ignoring the windows in
// |ignore|. Returns NULL if the topmost window at |screen_loc| does not
......@@ -35,7 +35,7 @@ class VIEWS_EXPORT X11TopmostWindowFinder
private:
// ui::EnumerateWindowsDelegate:
virtual bool ShouldStopIterating(XID xid) override;
bool ShouldStopIterating(XID xid) override;
// Returns true if |window| does not not belong to |ignore|, is visible and
// contains |screen_loc_|.
......
......@@ -46,12 +46,11 @@ class MinimizeWaiter : public X11PropertyChangeWaiter {
atom_cache_.reset(new ui::X11AtomCache(gfx::GetXDisplay(), kAtomsToCache));
}
virtual ~MinimizeWaiter() {
}
~MinimizeWaiter() override {}
private:
// X11PropertyChangeWaiter:
virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<Atom> wm_states;
if (ui::GetAtomArrayProperty(xwindow(), "_NET_WM_STATE", &wm_states)) {
std::vector<Atom>::iterator it = std::find(
......@@ -78,11 +77,10 @@ class StackingClientListWaiter : public X11PropertyChangeWaiter {
expected_windows_(expected_windows, expected_windows + count) {
}
virtual ~StackingClientListWaiter() {
}
~StackingClientListWaiter() override {}
// X11PropertyChangeWaiter:
virtual void Wait() override {
void Wait() override {
// StackingClientListWaiter may be created after
// _NET_CLIENT_LIST_STACKING already contains |expected_windows|.
if (!ShouldKeepOnWaiting(NULL))
......@@ -93,7 +91,7 @@ class StackingClientListWaiter : public X11PropertyChangeWaiter {
private:
// X11PropertyChangeWaiter:
virtual bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<XID> stack;
ui::GetXWindowStack(ui::GetX11RootWindow(), &stack);
for (size_t i = 0; i < expected_windows_.size(); ++i) {
......@@ -117,8 +115,7 @@ class X11TopmostWindowFinderTest : public ViewsTestBase {
X11TopmostWindowFinderTest() {
}
virtual ~X11TopmostWindowFinderTest() {
}
~X11TopmostWindowFinderTest() override {}
// Creates and shows a Widget with |bounds|. The caller takes ownership of
// the returned widget.
......@@ -205,7 +202,7 @@ class X11TopmostWindowFinderTest : public ViewsTestBase {
}
// ViewsTestBase:
virtual void SetUp() override {
void SetUp() override {
ViewsTestBase::SetUp();
// Make X11 synchronous for our display connection. This does not force the
......@@ -217,7 +214,7 @@ class X11TopmostWindowFinderTest : public ViewsTestBase {
X11DesktopHandler::get();
}
virtual void TearDown() override {
void TearDown() override {
XSynchronize(xdisplay(), False);
ViewsTestBase::TearDown();
}
......
......@@ -36,17 +36,16 @@ class X11WholeScreenMoveLoop : public X11MoveLoop,
public ui::PlatformEventDispatcher {
public:
explicit X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate);
virtual ~X11WholeScreenMoveLoop();
~X11WholeScreenMoveLoop() override;
// ui:::PlatformEventDispatcher:
virtual bool CanDispatchEvent(const ui::PlatformEvent& event) override;
virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
// X11MoveLoop:
virtual bool RunMoveLoop(aura::Window* window,
gfx::NativeCursor cursor) override;
virtual void UpdateCursor(gfx::NativeCursor cursor) override;
virtual void EndMoveLoop() override;
bool RunMoveLoop(aura::Window* window, gfx::NativeCursor cursor) override;
void UpdateCursor(gfx::NativeCursor cursor) override;
void EndMoveLoop() override;
private:
// Grabs the pointer, setting the mouse cursor to |cursor|. Returns true if
......
......@@ -30,10 +30,10 @@ class NativeWidgetAura;
class VIEWS_EXPORT X11WindowEventFilter : public ui::EventHandler {
public:
explicit X11WindowEventFilter(DesktopWindowTreeHost* window_tree_host);
virtual ~X11WindowEventFilter();
~X11WindowEventFilter() override;
// Overridden from ui::EventHandler:
virtual void OnMouseEvent(ui::MouseEvent* event) override;
void OnMouseEvent(ui::MouseEvent* event) override;
private:
// Called when the user clicked the caption area.
......
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