OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/views/chrome_views_delegate.h" | |
6 | |
7 #include "chrome/browser/ui/ash/ash_util.h" | |
8 | |
9 #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.
| |
10 views::Widget::InitParams::WindowOpacity | |
11 ChromeViewsDelegate::InferOpacity(views::Widget::InitParams* params) { | |
12 if (params->type != views::Widget::InitParams::TYPE_WINDOW && | |
13 params->type != views::Widget::InitParams::TYPE_PANEL) | |
14 // 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.
| |
15 // opaque. | |
16 return views::Widget::InitParams::OPAQUE_WINDOW; | |
17 | |
18 // We want translucent windows when either we are in ASH or we are | |
19 // a top level window which is not of type TYPE_WINDOW. | |
20 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
| |
21 (params->top_level && params->type != | |
22 views::Widget::InitParams::TYPE_WINDOW)) | |
23 return views::Widget::InitParams::TRANSLUCENT_WINDOW; | |
24 | |
25 return views::Widget::InitParams::OPAQUE_WINDOW; | |
26 } | |
27 #endif | |
OLD | NEW |