OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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/window.h" | |
6 | |
7 #include "ui/views/bubble/bubble_delegate.h" | |
8 #include "ui/views/widget/widget.h" | |
9 | |
10 // Note: This file should be removed after the old ChromeOS frontend is removed. | |
11 // It is not needed for Aura. | |
12 // The visual style implemented by BubbleFrameView/BubbleWindow for | |
13 // ChromeOS should move to Ash. | |
14 // Calling code should just call the standard views Widget creation | |
15 // methods and "the right thing" should just happen. | |
16 // The remainder of the code here is dealing with the legacy CrOS WM and | |
17 // can also be removed. | |
18 | |
19 namespace browser { | |
20 | |
21 views::Widget* CreateFramelessViewsWindow(gfx::NativeWindow parent, | |
22 views::WidgetDelegate* delegate) { | |
23 views::Widget* widget = new views::Widget; | |
24 views::Widget::InitParams params( | |
25 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | |
26 params.delegate = delegate; | |
27 // Will this function be called if !defined(USE_AURA)? | |
28 #if defined(OS_WIN) || defined(USE_AURA) | |
29 params.parent = parent; | |
30 #endif | |
31 // No frame so does not need params.transparent = true | |
32 widget->Init(params); | |
33 return widget; | |
34 } | |
35 | |
36 } // namespace browser | |
OLD | NEW |