| Index: ash/wm/frame_painter.cc
|
| diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
|
| index 631c05874cff981413726b8d6b75e41aadfda188..b68bfa74d6bf5870291be18dc493cf09ea739087 100644
|
| --- a/ash/wm/frame_painter.cc
|
| +++ b/ash/wm/frame_painter.cc
|
| @@ -76,6 +76,9 @@ const int kActivationCrossfadeDurationMs = 200;
|
| // Alpha/opacity value for fully-opaque headers.
|
| const int kFullyOpaque = 255;
|
|
|
| +// A flag to enable/disable solo window header.
|
| +bool solo_window_header_enabled = true;
|
| +
|
| // Tiles an image into an area, rounding the top corners. Samples |image|
|
| // starting |image_inset_x| pixels from the left of the image.
|
| void TileRoundRect(gfx::Canvas* canvas,
|
| @@ -276,6 +279,11 @@ void FramePainter::Init(
|
| }
|
|
|
| // static
|
| +void FramePainter::SetSoloWindowHeadersEnabled(bool enabled) {
|
| + solo_window_header_enabled = enabled;
|
| +}
|
| +
|
| +// static
|
| void FramePainter::UpdateSoloWindowHeader(RootWindow* root_window) {
|
| // Use a separate function here so callers outside of FramePainter don't need
|
| // to know about "ignorable_window".
|
| @@ -748,12 +756,12 @@ int FramePainter::GetHeaderOpacity(
|
| }
|
|
|
| bool FramePainter::UseSoloWindowHeader() const {
|
| + if (!solo_window_header_enabled)
|
| + return false;
|
| // Don't use transparent headers for panels, pop-ups, etc.
|
| if (!IsSoloWindowHeaderCandidate(window_))
|
| return false;
|
| aura::RootWindow* root = window_->GetRootWindow();
|
| - if (!root || root->GetProperty(internal::kIgnoreSoloWindowFramePainterPolicy))
|
| - return false;
|
| // Don't recompute every time, as it would require many window property
|
| // lookups.
|
| return internal::GetRootWindowSettings(root)->solo_window_header;
|
|
|