| 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..a9c91d5f134fd9ccf398841f1b35cfdd5c59ec19
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/views/chrome_views_delegate_aura.cc
|
| @@ -0,0 +1,23 @@
|
| +// 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"
|
| +
|
| +views::Widget::InitParams::WindowOpacity
|
| +ChromeViewsDelegate::GetOpacityForInitParams(
|
| + const views::Widget::InitParams& params) {
|
| +#if defined(USE_ASH)
|
| + gfx::NativeView native_view = params.parent ? params.parent : params.context;
|
| + if (native_view && chrome::IsNativeViewInAsh(native_view))
|
| + return views::Widget::InitParams::TRANSLUCENT_WINDOW;
|
| +#endif
|
| + // 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 (params.top_level && params.type != views::Widget::InitParams::TYPE_WINDOW)
|
| + return views::Widget::InitParams::TRANSLUCENT_WINDOW;
|
| +
|
| + return views::Widget::InitParams::OPAQUE_WINDOW;
|
| +}
|
|
|