Commit e9d75858 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

overview: Remove top bar color flashing when entering overview.

This requires deleting WindowSelectorItem::RoundedContainerView.

screenshot: https://screenshot.googleplex.com/Gu5wG5LOPHY

Test: manual, run WindowSelectorTests
Bug: 839477
Change-Id: I933d0de5ba38a9c829d2266f945cc62fd2b5d7c9
Reviewed-on: https://chromium-review.googlesource.com/1161482
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580668}
parent eeb07359
...@@ -314,22 +314,6 @@ gfx::Rect ScopedTransformOverviewWindow::GetTransformedBounds() const { ...@@ -314,22 +314,6 @@ gfx::Rect ScopedTransformOverviewWindow::GetTransformedBounds() const {
return bounds; return bounds;
} }
SkColor ScopedTransformOverviewWindow::GetTopColor() const {
for (auto* window : wm::GetTransientTreeIterator(window_)) {
// If there are regular windows in the transient ancestor tree, all those
// windows are shown in the same overview item and the header is not masked.
if (window != window_ &&
(window->type() == aura::client::WINDOW_TYPE_NORMAL ||
window->type() == aura::client::WINDOW_TYPE_PANEL)) {
return SK_ColorTRANSPARENT;
}
}
return window_->GetProperty(wm::GetWindowState(window_)->IsActive()
? kFrameActiveColorKey
: kFrameInactiveColorKey);
}
int ScopedTransformOverviewWindow::GetTopInset() const { int ScopedTransformOverviewWindow::GetTopInset() const {
// Mirror window doesn't have insets. // Mirror window doesn't have insets.
if (minimized_widget_) if (minimized_widget_)
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/optional.h" #include "base/optional.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/compositor/layer_animation_observer.h" #include "ui/compositor/layer_animation_observer.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
...@@ -110,11 +109,6 @@ class ASH_EXPORT ScopedTransformOverviewWindow ...@@ -110,11 +109,6 @@ class ASH_EXPORT ScopedTransformOverviewWindow
// the original |window_|'s header to be hidden. // the original |window_|'s header to be hidden.
gfx::Rect GetTransformedBounds() const; gfx::Rect GetTransformedBounds() const;
// Returns the kFrameActiveColorKey or kFrameInactiveColorKey property of
// |window_| unless there are transient ancestors, in which case returns
// SK_ColorTRANSPARENT.
SkColor GetTopColor() const;
// Returns the kTopViewInset property of |window_| unless there are transient // Returns the kTopViewInset property of |window_| unless there are transient
// ancestors, in which case returns 0. // ancestors, in which case returns 0.
int GetTopInset() const; int GetTopInset() const;
......
This diff is collapsed.
...@@ -238,8 +238,8 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, ...@@ -238,8 +238,8 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
bool animating_to_close() const { return animating_to_close_; } bool animating_to_close() const { return animating_to_close_; }
void set_animating_to_close(bool val) { animating_to_close_ = val; } void set_animating_to_close(bool val) { animating_to_close_ = val; }
float GetCloseButtonOpacityForTesting(); bool GetCloseButtonVisibilityForTesting() const;
float GetTitlebarOpacityForTesting(); float GetTitlebarOpacityForTesting() const;
gfx::Rect GetShadowBoundsForTesting(); gfx::Rect GetShadowBoundsForTesting();
private: private:
...@@ -335,30 +335,27 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener, ...@@ -335,30 +335,27 @@ class ASH_EXPORT WindowSelectorItem : public views::ButtonListener,
// Container view that owns a Button view covering the |transform_window_|. // Container view that owns a Button view covering the |transform_window_|.
// That button serves as an event shield to receive all events such as clicks // That button serves as an event shield to receive all events such as clicks
// targeting the |transform_window_| or the overview header above the window. // targeting the |transform_window_| or the overview header above the window.
// The shield button owns |background_view_| which owns |label_view_| // The shield button owns a header view which owns |label_view_|
// and |close_button_|. // and |close_button_|.
CaptionContainerView* caption_container_view_ = nullptr; CaptionContainerView* caption_container_view_ = nullptr;
// A View for the text label above the window owned by the |background_view_|. // A View for the text label above the window owned by the a header view in
// |caption_container_view_|.
views::Label* label_view_ = nullptr; views::Label* label_view_ = nullptr;
// A View for the text label in the center of the window warning users that // A View for the text label in the center of the window warning users that
// this window cannot be snapped for splitview. Owned by a container in // this window cannot be snapped for splitview. Owned by a container in
// |background_view_|. // |caption_container_view_|.
views::Label* cannot_snap_label_view_ = nullptr; views::Label* cannot_snap_label_view_ = nullptr;
// A close button for the window in this item owned by the |background_view_|. // A close button for the window in this item owned by a header view in
// |caption_container_view_|.
OverviewCloseButton* close_button_ = nullptr; OverviewCloseButton* close_button_ = nullptr;
// Pointer to the WindowSelector that owns the WindowGrid containing |this|. // Pointer to the WindowSelector that owns the WindowGrid containing |this|.
// Guaranteed to be non-null for the lifetime of |this|. // Guaranteed to be non-null for the lifetime of |this|.
WindowSelector* window_selector_; WindowSelector* window_selector_;
// Pointer to a view that covers the original header and has rounded top
// corners. This view can have its color and opacity animated. It has a layer
// which is the only textured layer used by the |item_widget_|.
RoundedContainerView* background_view_ = nullptr;
// Pointer to the WindowGrid that contains |this|. Guaranteed to be non-null // Pointer to the WindowGrid that contains |this|. Guaranteed to be non-null
// for the lifetime of |this|. // for the lifetime of |this|.
WindowGrid* window_grid_; WindowGrid* window_grid_;
......
This diff is collapsed.
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