Chromium Code Reviews| Index: chrome/browser/ui/views/chrome_views_delegate_aura.cc |
| diff --git a/chrome/browser/ui/views/chrome_views_delegate_aura.cc b/chrome/browser/ui/views/chrome_views_delegate_aura.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..97c7066e1555d9df8f15a787c05036f17c047eb1 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/chrome_views_delegate_aura.cc |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/ui/views/chrome_views_delegate.h" |
| + |
| +#include "chrome/browser/ui/ash/ash_util.h" |
| + |
| +#if defined(USE_AURA) |
|
sky
2013/12/17 15:59:00
You shouldn't need this ifdef here.
Shrikant Kelkar
2013/12/17 18:01:00
Done.
|
| +views::Widget::InitParams::WindowOpacity |
| +ChromeViewsDelegate::InferOpacity(views::Widget::InitParams* params) { |
| + if (params->type != views::Widget::InitParams::TYPE_WINDOW && |
| + params->type != views::Widget::InitParams::TYPE_PANEL) |
| + // All other windows except TYPE_WINDOW AND TYPE_PANEL should be |
|
sky
2013/12/17 15:59:00
This comment isn't helpful since it just documents
Shrikant Kelkar
2013/12/17 18:01:00
Done.
|
| + // opaque. |
| + return views::Widget::InitParams::OPAQUE_WINDOW; |
| + |
| + // We want translucent windows when either we are in ASH or we are |
| + // a top level window which is not of type TYPE_WINDOW. |
| + if (chrome::IsNativeViewInAsh(params->context) || |
|
sky
2013/12/17 15:59:00
You want GetContext(), and it make be NULL.
Shrikant Kelkar
2013/12/17 18:01:00
Didn't see GetContext in widget.cc, only found in
sky
2013/12/17 19:14:23
HA! Nuke the method then. I believe you should pre
|
| + (params->top_level && params->type != |
| + views::Widget::InitParams::TYPE_WINDOW)) |
| + return views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| + |
| + return views::Widget::InitParams::OPAQUE_WINDOW; |
| +} |
| +#endif |