Skip to content

Commit

Permalink
wm: Add metadata for window cycler views.
Browse files Browse the repository at this point in the history
This will help with some debugging.

Bug: none
Test: none
Change-Id: Ifcb3b5b02ebbbe4cf3feaaca32cbdc0b83dfce60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2987246
Auto-Submit: Sammie Quon <sammiequon@chromium.org>
Commit-Queue: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#896123}
  • Loading branch information
Sammie Quon authored and Chromium LUCI CQ committed Jun 25, 2021
1 parent 3c4ef6b commit 5c81d83
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ash/wm/window_cycle/window_cycle_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include "ui/aura/window.h"
#include "ui/aura/window_targeter.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/compositor/animation_throughput_reporter.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_sequence.h"
Expand Down Expand Up @@ -169,6 +171,8 @@ aura::Window* GetRootWindowForCycleView() {
// thumbnail of the window's contents.
class WindowCycleItemView : public WindowMiniView {
public:
METADATA_HEADER(WindowCycleItemView);

explicit WindowCycleItemView(aura::Window* window) : WindowMiniView(window) {
SetFocusBehavior(FocusBehavior::ALWAYS);
SetNotifyEnterExitOnChild(true);
Expand Down Expand Up @@ -268,10 +272,15 @@ class WindowCycleItemView : public WindowMiniView {
}
};

BEGIN_METADATA(WindowCycleItemView, WindowMiniView)
END_METADATA

// A view that shows a collection of windows the user can tab through.
class WindowCycleView : public views::WidgetDelegateView,
public ui::ImplicitAnimationObserver {
public:
METADATA_HEADER(WindowCycleView);

WindowCycleView(aura::Window* root_window,
const WindowCycleList::WindowList& windows)
: root_window_(root_window) {
Expand Down Expand Up @@ -863,6 +872,9 @@ class WindowCycleView : public views::WidgetDelegateView,
std::unique_ptr<WmFlingHandler> fling_handler_;
};

BEGIN_METADATA(WindowCycleView, views::WidgetDelegateView)
END_METADATA

WindowCycleList::WindowCycleList(const WindowList& windows)
: windows_(windows) {
if (!ShouldShowUi())
Expand Down
4 changes: 4 additions & 0 deletions ash/wm/window_mini_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "ui/accessibility/ax_node_data.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/views/controls/image_view.h"
Expand Down Expand Up @@ -224,4 +225,7 @@ void WindowMiniView::OnWindowTitleChanged(aura::Window* window) {
title_label_->SetText(GetWindowTitle(window));
}

BEGIN_METADATA(WindowMiniView, views::View)
END_METADATA

} // namespace ash
3 changes: 3 additions & 0 deletions ash/wm/window_mini_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/scoped_observation.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/controls/button/button.h"

namespace views {
Expand All @@ -27,6 +28,8 @@ class WmHighlightItemBorder;
class ASH_EXPORT WindowMiniView : public views::View,
public aura::WindowObserver {
public:
METADATA_HEADER(WindowMiniView);

WindowMiniView(const WindowMiniView&) = delete;
WindowMiniView& operator=(const WindowMiniView&) = delete;
~WindowMiniView() override;
Expand Down

0 comments on commit 5c81d83

Please sign in to comment.