Commit d7670653 authored by tapted's avatar tapted Committed by Commit bot

MacViews: Remove redundant virtuals in NativeWidgetMac and co.

Strict virtual annotation checks were enabled on Mac in r311365.

This gets toolkit_views for Mac on board.

BUG=417463

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

Cr-Commit-Position: refs/heads/master@{#311528}
parent 27711f3e
...@@ -52,7 +52,7 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate, ...@@ -52,7 +52,7 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate,
// Creates one side of the bridge. |parent| must not be NULL. // Creates one side of the bridge. |parent| must not be NULL.
explicit BridgedNativeWidget(NativeWidgetMac* parent); explicit BridgedNativeWidget(NativeWidgetMac* parent);
virtual ~BridgedNativeWidget(); ~BridgedNativeWidget() override;
// Initialize the bridge, "retains" ownership of |window|. // Initialize the bridge, "retains" ownership of |window|.
void Init(base::scoped_nsobject<NSWindow> window, void Init(base::scoped_nsobject<NSWindow> window,
...@@ -141,7 +141,7 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate, ...@@ -141,7 +141,7 @@ class VIEWS_EXPORT BridgedNativeWidget : public ui::LayerDelegate,
bool window_visible() { return window_visible_; } bool window_visible() { return window_visible_; }
// Overridden from internal::InputMethodDelegate: // Overridden from internal::InputMethodDelegate:
virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) override; void DispatchKeyEventPostIME(const ui::KeyEvent& key) override;
private: private:
// Closes all child windows. BridgedNativeWidget children will be destroyed. // Closes all child windows. BridgedNativeWidget children will be destroyed.
......
...@@ -78,7 +78,7 @@ class MockNativeWidgetMac : public NativeWidgetMac { ...@@ -78,7 +78,7 @@ class MockNativeWidgetMac : public NativeWidgetMac {
} }
// internal::NativeWidgetPrivate: // internal::NativeWidgetPrivate:
virtual void InitNativeWidget(const Widget::InitParams& params) override { void InitNativeWidget(const Widget::InitParams& params) override {
ownership_ = params.ownership; ownership_ = params.ownership;
// Usually the bridge gets initialized here. It is skipped to run extra // Usually the bridge gets initialized here. It is skipped to run extra
...@@ -86,7 +86,7 @@ class MockNativeWidgetMac : public NativeWidgetMac { ...@@ -86,7 +86,7 @@ class MockNativeWidgetMac : public NativeWidgetMac {
delegate()->OnNativeWidgetCreated(true); delegate()->OnNativeWidgetCreated(true);
} }
virtual void ReorderNativeViews() override { void ReorderNativeViews() override {
// Called via Widget::Init to set the content view. No-op in these tests. // Called via Widget::Init to set the content view. No-op in these tests.
} }
...@@ -107,7 +107,7 @@ class BridgedNativeWidgetTestBase : public ui::CocoaTest { ...@@ -107,7 +107,7 @@ class BridgedNativeWidgetTestBase : public ui::CocoaTest {
} }
// Overridden from testing::Test: // Overridden from testing::Test:
virtual void SetUp() override { void SetUp() override {
ui::CocoaTest::SetUp(); ui::CocoaTest::SetUp();
init_params_.native_widget = native_widget_mac_; init_params_.native_widget = native_widget_mac_;
...@@ -133,7 +133,7 @@ class BridgedNativeWidgetTestBase : public ui::CocoaTest { ...@@ -133,7 +133,7 @@ class BridgedNativeWidgetTestBase : public ui::CocoaTest {
class BridgedNativeWidgetTest : public BridgedNativeWidgetTestBase { class BridgedNativeWidgetTest : public BridgedNativeWidgetTestBase {
public: public:
BridgedNativeWidgetTest(); BridgedNativeWidgetTest();
virtual ~BridgedNativeWidgetTest(); ~BridgedNativeWidgetTest() override;
// Install a textfield in the view hierarchy and make it the text input // Install a textfield in the view hierarchy and make it the text input
// client. // client.
...@@ -143,8 +143,8 @@ class BridgedNativeWidgetTest : public BridgedNativeWidgetTestBase { ...@@ -143,8 +143,8 @@ class BridgedNativeWidgetTest : public BridgedNativeWidgetTestBase {
std::string GetText(); std::string GetText();
// testing::Test: // testing::Test:
virtual void SetUp() override; void SetUp() override;
virtual void TearDown() override; void TearDown() override;
protected: protected:
scoped_ptr<views::View> view_; scoped_ptr<views::View> view_;
......
...@@ -13,17 +13,17 @@ namespace views { ...@@ -13,17 +13,17 @@ namespace views {
class MenuMessageLoopMac : public MenuMessageLoop { class MenuMessageLoopMac : public MenuMessageLoop {
public: public:
MenuMessageLoopMac(); MenuMessageLoopMac();
virtual ~MenuMessageLoopMac(); ~MenuMessageLoopMac() override;
// Overridden from MenuMessageLoop: // Overridden from MenuMessageLoop:
virtual void Run(MenuController* controller, void Run(MenuController* controller,
Widget* owner, Widget* owner,
bool nested_menu) override; bool nested_menu) override;
virtual void QuitNow() override; void QuitNow() override;
virtual void RepostEventToWindow(const ui::LocatedEvent& event, void RepostEventToWindow(const ui::LocatedEvent& event,
gfx::NativeWindow window, gfx::NativeWindow window,
const gfx::Point& screen_loc) override; const gfx::Point& screen_loc) override;
virtual void ClearOwner() override; void ClearOwner() override;
private: private:
DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopMac); DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopMac);
......
...@@ -15,9 +15,9 @@ namespace test { ...@@ -15,9 +15,9 @@ namespace test {
class MenuRunnerCocoaTest : public ViewsTestBase { class MenuRunnerCocoaTest : public ViewsTestBase {
public: public:
MenuRunnerCocoaTest() : runner_(NULL) {} MenuRunnerCocoaTest() : runner_(NULL) {}
virtual ~MenuRunnerCocoaTest() {} ~MenuRunnerCocoaTest() override {}
virtual void SetUp() override { void SetUp() override {
ViewsTestBase::SetUp(); ViewsTestBase::SetUp();
menu_.reset(new ui::SimpleMenuModel(NULL)); menu_.reset(new ui::SimpleMenuModel(NULL));
...@@ -27,7 +27,7 @@ class MenuRunnerCocoaTest : public ViewsTestBase { ...@@ -27,7 +27,7 @@ class MenuRunnerCocoaTest : public ViewsTestBase {
EXPECT_FALSE(runner_->IsRunning()); EXPECT_FALSE(runner_->IsRunning());
} }
virtual void TearDown() override { void TearDown() override {
if (runner_) { if (runner_) {
runner_->Release(); runner_->Release();
runner_ = NULL; runner_ = NULL;
......
...@@ -20,18 +20,18 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface { ...@@ -20,18 +20,18 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
public: public:
explicit MenuRunnerImplCocoa(ui::MenuModel* menu); explicit MenuRunnerImplCocoa(ui::MenuModel* menu);
virtual bool IsRunning() const override; bool IsRunning() const override;
virtual void Release() override; void Release() override;
virtual MenuRunner::RunResult RunMenuAt(Widget* parent, MenuRunner::RunResult RunMenuAt(Widget* parent,
MenuButton* button, MenuButton* button,
const gfx::Rect& bounds, const gfx::Rect& bounds,
MenuAnchorPosition anchor, MenuAnchorPosition anchor,
int32 run_types) override; int32 run_types) override;
virtual void Cancel() override; void Cancel() override;
virtual base::TimeDelta GetClosingEventTime() const override; base::TimeDelta GetClosingEventTime() const override;
private: private:
virtual ~MenuRunnerImplCocoa(); ~MenuRunnerImplCocoa() override;
// The Cocoa menu controller that this instance is bridging. // The Cocoa menu controller that this instance is bridging.
base::scoped_nsobject<MenuController> menu_controller_; base::scoped_nsobject<MenuController> menu_controller_;
......
...@@ -17,21 +17,21 @@ class NativeViewHost; ...@@ -17,21 +17,21 @@ class NativeViewHost;
class VIEWS_EXPORT NativeViewHostMac : public NativeViewHostWrapper { class VIEWS_EXPORT NativeViewHostMac : public NativeViewHostWrapper {
public: public:
explicit NativeViewHostMac(NativeViewHost* host); explicit NativeViewHostMac(NativeViewHost* host);
virtual ~NativeViewHostMac(); ~NativeViewHostMac() override;
// Overridden from NativeViewHostWrapper: // Overridden from NativeViewHostWrapper:
virtual void AttachNativeView() override; void AttachNativeView() override;
virtual void NativeViewDetaching(bool destroyed) override; void NativeViewDetaching(bool destroyed) override;
virtual void AddedToWidget() override; void AddedToWidget() override;
virtual void RemovedFromWidget() override; void RemovedFromWidget() override;
virtual void InstallClip(int x, int y, int w, int h) override; void InstallClip(int x, int y, int w, int h) override;
virtual bool HasInstalledClip() override; bool HasInstalledClip() override;
virtual void UninstallClip() override; void UninstallClip() override;
virtual void ShowWidget(int x, int y, int w, int h) override; void ShowWidget(int x, int y, int w, int h) override;
virtual void HideWidget() override; void HideWidget() override;
virtual void SetFocus() override; void SetFocus() override;
virtual gfx::NativeViewAccessible GetNativeViewAccessible() override; gfx::NativeViewAccessible GetNativeViewAccessible() override;
virtual gfx::NativeCursor GetCursor(int x, int y) override; gfx::NativeCursor GetCursor(int x, int y) override;
private: private:
// Our associated NativeViewHost. Owns this. // Our associated NativeViewHost. Owns this.
......
...@@ -15,7 +15,7 @@ class EventMonitorMac : public EventMonitor { ...@@ -15,7 +15,7 @@ class EventMonitorMac : public EventMonitor {
public: public:
EventMonitorMac(ui::EventHandler* event_handler, EventMonitorMac(ui::EventHandler* event_handler,
gfx::NativeWindow target_window); gfx::NativeWindow target_window);
virtual ~EventMonitorMac(); ~EventMonitorMac() override;
private: private:
id monitor_; id monitor_;
......
...@@ -242,53 +242,48 @@ class EventGeneratorDelegateMac : public ui::EventTarget, ...@@ -242,53 +242,48 @@ class EventGeneratorDelegateMac : public ui::EventTarget,
} }
// Overridden from ui::EventTarget: // Overridden from ui::EventTarget:
virtual bool CanAcceptEvent(const ui::Event& event) override { return true; } bool CanAcceptEvent(const ui::Event& event) override { return true; }
virtual ui::EventTarget* GetParentTarget() override { return NULL; } ui::EventTarget* GetParentTarget() override { return NULL; }
virtual scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override; scoped_ptr<ui::EventTargetIterator> GetChildIterator() const override;
virtual ui::EventTargeter* GetEventTargeter() override { ui::EventTargeter* GetEventTargeter() override { return this; }
return this;
}
// Overridden from ui::EventHandler (via ui::EventTarget): // Overridden from ui::EventHandler (via ui::EventTarget):
virtual void OnMouseEvent(ui::MouseEvent* event) override; void OnMouseEvent(ui::MouseEvent* event) override;
// Overridden from ui::EventSource: // Overridden from ui::EventSource:
virtual ui::EventProcessor* GetEventProcessor() override { return this; } ui::EventProcessor* GetEventProcessor() override { return this; }
// Overridden from ui::EventProcessor: // Overridden from ui::EventProcessor:
virtual ui::EventTarget* GetRootTarget() override { return this; } ui::EventTarget* GetRootTarget() override { return this; }
// Overridden from ui::EventDispatcherDelegate (via ui::EventProcessor): // Overridden from ui::EventDispatcherDelegate (via ui::EventProcessor):
virtual bool CanDispatchToTarget(EventTarget* target) override { bool CanDispatchToTarget(EventTarget* target) override { return true; }
return true;
}
// Overridden from ui::test::EventGeneratorDelegate: // Overridden from ui::test::EventGeneratorDelegate:
virtual void SetContext(ui::test::EventGenerator* owner, void SetContext(ui::test::EventGenerator* owner,
gfx::NativeWindow root_window, gfx::NativeWindow root_window,
gfx::NativeWindow window) override; gfx::NativeWindow window) override;
virtual ui::EventTarget* GetTargetAt(const gfx::Point& location) override { ui::EventTarget* GetTargetAt(const gfx::Point& location) override {
return this; return this;
} }
virtual ui::EventSource* GetEventSource(ui::EventTarget* target) override { ui::EventSource* GetEventSource(ui::EventTarget* target) override {
return this; return this;
} }
virtual gfx::Point CenterOfTarget( gfx::Point CenterOfTarget(const ui::EventTarget* target) const override;
const ui::EventTarget* target) const override; gfx::Point CenterOfWindow(gfx::NativeWindow window) const override;
virtual gfx::Point CenterOfWindow(gfx::NativeWindow window) const override;
virtual void ConvertPointFromTarget(const ui::EventTarget* target, void ConvertPointFromTarget(const ui::EventTarget* target,
gfx::Point* point) const override {} gfx::Point* point) const override {}
virtual void ConvertPointToTarget(const ui::EventTarget* target, void ConvertPointToTarget(const ui::EventTarget* target,
gfx::Point* point) const override {} gfx::Point* point) const override {}
virtual void ConvertPointFromHost(const ui::EventTarget* hosted_target, void ConvertPointFromHost(const ui::EventTarget* hosted_target,
gfx::Point* point) const override {} gfx::Point* point) const override {}
private: private:
friend struct DefaultSingletonTraits<EventGeneratorDelegateMac>; friend struct DefaultSingletonTraits<EventGeneratorDelegateMac>;
EventGeneratorDelegateMac(); EventGeneratorDelegateMac();
virtual ~EventGeneratorDelegateMac(); ~EventGeneratorDelegateMac() override;
ui::test::EventGenerator* owner_; ui::test::EventGenerator* owner_;
NSWindow* window_; NSWindow* window_;
......
...@@ -17,7 +17,7 @@ namespace views { ...@@ -17,7 +17,7 @@ namespace views {
class ViewsTestHelperMac : public ViewsTestHelper { class ViewsTestHelperMac : public ViewsTestHelper {
public: public:
ViewsTestHelperMac(); ViewsTestHelperMac();
virtual ~ViewsTestHelperMac(); ~ViewsTestHelperMac() override;
private: private:
// Disable animations during tests. // Disable animations during tests.
......
...@@ -18,7 +18,7 @@ class BridgedNativeWidget; ...@@ -18,7 +18,7 @@ class BridgedNativeWidget;
class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate {
public: public:
NativeWidgetMac(internal::NativeWidgetDelegate* delegate); NativeWidgetMac(internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetMac(); ~NativeWidgetMac() override;
// Retrieves the bridge associated with the given NSWindow. Returns null if // Retrieves the bridge associated with the given NSWindow. Returns null if
// the supplied handle has no associated Widget. // the supplied handle has no associated Widget.
...@@ -30,95 +30,92 @@ class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate { ...@@ -30,95 +30,92 @@ class VIEWS_EXPORT NativeWidgetMac : public internal::NativeWidgetPrivate {
void OnWindowWillClose(); void OnWindowWillClose();
// internal::NativeWidgetPrivate: // internal::NativeWidgetPrivate:
virtual void InitNativeWidget(const Widget::InitParams& params) override; void InitNativeWidget(const Widget::InitParams& params) override;
virtual NonClientFrameView* CreateNonClientFrameView() override; NonClientFrameView* CreateNonClientFrameView() override;
virtual bool ShouldUseNativeFrame() const override; bool ShouldUseNativeFrame() const override;
virtual bool ShouldWindowContentsBeTransparent() const override; bool ShouldWindowContentsBeTransparent() const override;
virtual void FrameTypeChanged() override; void FrameTypeChanged() override;
virtual Widget* GetWidget() override; Widget* GetWidget() override;
virtual const Widget* GetWidget() const override; const Widget* GetWidget() const override;
virtual gfx::NativeView GetNativeView() const override; gfx::NativeView GetNativeView() const override;
virtual gfx::NativeWindow GetNativeWindow() const override; gfx::NativeWindow GetNativeWindow() const override;
virtual Widget* GetTopLevelWidget() override; Widget* GetTopLevelWidget() override;
virtual const ui::Compositor* GetCompositor() const override; const ui::Compositor* GetCompositor() const override;
virtual const ui::Layer* GetLayer() const override; const ui::Layer* GetLayer() const override;
virtual void ReorderNativeViews() override; void ReorderNativeViews() override;
virtual void ViewRemoved(View* view) override; void ViewRemoved(View* view) override;
virtual void SetNativeWindowProperty(const char* name, void* value) override; void SetNativeWindowProperty(const char* name, void* value) override;
virtual void* GetNativeWindowProperty(const char* name) const override; void* GetNativeWindowProperty(const char* name) const override;
virtual TooltipManager* GetTooltipManager() const override; TooltipManager* GetTooltipManager() const override;
virtual void SetCapture() override; void SetCapture() override;
virtual void ReleaseCapture() override; void ReleaseCapture() override;
virtual bool HasCapture() const override; bool HasCapture() const override;
virtual InputMethod* CreateInputMethod() override; InputMethod* CreateInputMethod() override;
virtual internal::InputMethodDelegate* GetInputMethodDelegate() override; internal::InputMethodDelegate* GetInputMethodDelegate() override;
virtual ui::InputMethod* GetHostInputMethod() override; ui::InputMethod* GetHostInputMethod() override;
virtual void CenterWindow(const gfx::Size& size) override; void CenterWindow(const gfx::Size& size) override;
virtual void GetWindowPlacement( void GetWindowPlacement(gfx::Rect* bounds,
gfx::Rect* bounds,
ui::WindowShowState* maximized) const override; ui::WindowShowState* maximized) const override;
virtual bool SetWindowTitle(const base::string16& title) override; bool SetWindowTitle(const base::string16& title) override;
virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, void SetWindowIcons(const gfx::ImageSkia& window_icon,
const gfx::ImageSkia& app_icon) override; const gfx::ImageSkia& app_icon) override;
virtual void InitModalType(ui::ModalType modal_type) override; void InitModalType(ui::ModalType modal_type) override;
virtual gfx::Rect GetWindowBoundsInScreen() const override; gfx::Rect GetWindowBoundsInScreen() const override;
virtual gfx::Rect GetClientAreaBoundsInScreen() const override; gfx::Rect GetClientAreaBoundsInScreen() const override;
virtual gfx::Rect GetRestoredBounds() const override; gfx::Rect GetRestoredBounds() const override;
virtual void SetBounds(const gfx::Rect& bounds) override; void SetBounds(const gfx::Rect& bounds) override;
virtual void SetSize(const gfx::Size& size) override; void SetSize(const gfx::Size& size) override;
virtual void StackAbove(gfx::NativeView native_view) override; void StackAbove(gfx::NativeView native_view) override;
virtual void StackAtTop() override; void StackAtTop() override;
virtual void StackBelow(gfx::NativeView native_view) override; void StackBelow(gfx::NativeView native_view) override;
virtual void SetShape(gfx::NativeRegion shape) override; void SetShape(gfx::NativeRegion shape) override;
virtual void Close() override; void Close() override;
virtual void CloseNow() override; void CloseNow() override;
virtual void Show() override; void Show() override;
virtual void Hide() override; void Hide() override;
virtual void ShowMaximizedWithBounds( void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) override;
const gfx::Rect& restored_bounds) override; void ShowWithWindowState(ui::WindowShowState state) override;
virtual void ShowWithWindowState(ui::WindowShowState state) override; bool IsVisible() const override;
virtual bool IsVisible() const override; void Activate() override;
virtual void Activate() override; void Deactivate() override;
virtual void Deactivate() override; bool IsActive() const override;
virtual bool IsActive() const override; void SetAlwaysOnTop(bool always_on_top) override;
virtual void SetAlwaysOnTop(bool always_on_top) override; bool IsAlwaysOnTop() const override;
virtual bool IsAlwaysOnTop() const override; void SetVisibleOnAllWorkspaces(bool always_visible) override;
virtual void SetVisibleOnAllWorkspaces(bool always_visible) override; void Maximize() override;
virtual void Maximize() override; void Minimize() override;
virtual void Minimize() override; bool IsMaximized() const override;
virtual bool IsMaximized() const override; bool IsMinimized() const override;
virtual bool IsMinimized() const override; void Restore() override;
virtual void Restore() override; void SetFullscreen(bool fullscreen) override;
virtual void SetFullscreen(bool fullscreen) override; bool IsFullscreen() const override;
virtual bool IsFullscreen() const override; void SetOpacity(unsigned char opacity) override;
virtual void SetOpacity(unsigned char opacity) override; void SetUseDragFrame(bool use_drag_frame) override;
virtual void SetUseDragFrame(bool use_drag_frame) override; void FlashFrame(bool flash_frame) override;
virtual void FlashFrame(bool flash_frame) override; void RunShellDrag(View* view,
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data, const ui::OSExchangeData& data,
const gfx::Point& location, const gfx::Point& location,
int operation, int operation,
ui::DragDropTypes::DragEventSource source) override; ui::DragDropTypes::DragEventSource source) override;
virtual void SchedulePaintInRect(const gfx::Rect& rect) override; void SchedulePaintInRect(const gfx::Rect& rect) override;
virtual void SetCursor(gfx::NativeCursor cursor) override; void SetCursor(gfx::NativeCursor cursor) override;
virtual bool IsMouseEventsEnabled() const override; bool IsMouseEventsEnabled() const override;
virtual void ClearNativeFocus() override; void ClearNativeFocus() override;
virtual gfx::Rect GetWorkAreaBoundsInScreen() const override; gfx::Rect GetWorkAreaBoundsInScreen() const override;
virtual Widget::MoveLoopResult RunMoveLoop( Widget::MoveLoopResult RunMoveLoop(
const gfx::Vector2d& drag_offset, const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source, Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) override; Widget::MoveLoopEscapeBehavior escape_behavior) override;
virtual void EndMoveLoop() override; void EndMoveLoop() override;
virtual void SetVisibilityChangedAnimationsEnabled(bool value) override; void SetVisibilityChangedAnimationsEnabled(bool value) override;
virtual void SetVisibilityAnimationDuration( void SetVisibilityAnimationDuration(const base::TimeDelta& duration) override;
const base::TimeDelta& duration) override; void SetVisibilityAnimationTransition(
virtual void SetVisibilityAnimationTransition(
Widget::VisibilityTransition transition) override; Widget::VisibilityTransition transition) override;
virtual ui::NativeTheme* GetNativeTheme() const override; ui::NativeTheme* GetNativeTheme() const override;
virtual void OnRootViewLayout() override; void OnRootViewLayout() override;
virtual bool IsTranslucentWindowOpacitySupported() const override; bool IsTranslucentWindowOpacitySupported() const override;
virtual void OnSizeConstraintsChanged() override; void OnSizeConstraintsChanged() override;
virtual void RepostNativeEvent(gfx::NativeEvent native_event) override; void RepostNativeEvent(gfx::NativeEvent native_event) override;
protected: protected:
internal::NativeWidgetDelegate* delegate() { return delegate_; } internal::NativeWidgetDelegate* delegate() { return delegate_; }
......
...@@ -42,7 +42,7 @@ class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver { ...@@ -42,7 +42,7 @@ class NativeWidgetMacInteractiveUITest::Observer : public TestWidgetObserver {
Observer(NativeWidgetMacInteractiveUITest* parent, Widget* widget) Observer(NativeWidgetMacInteractiveUITest* parent, Widget* widget)
: TestWidgetObserver(widget), parent_(parent) {} : TestWidgetObserver(widget), parent_(parent) {}
virtual void OnWidgetActivationChanged(Widget* widget, bool active) override { void OnWidgetActivationChanged(Widget* widget, bool active) override {
if (active) if (active)
parent_->activationCount_++; parent_->activationCount_++;
else else
......
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