Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: chrome/browser/ui/views/window.cc

Issue 10262002: views: Get rid of CreateViewsBubbleAboveLockScreen() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/window.h" 5 #include "chrome/browser/ui/views/window.h"
6 6
7 #include "ui/views/bubble/bubble_delegate.h" 7 #include "ui/views/bubble/bubble_delegate.h"
8 #include "ui/views/widget/widget.h" 8 #include "ui/views/widget/widget.h"
9 9
10 #if defined(USE_AURA)
11 #include "ash/shell.h"
12 #include "ash/shell_window_ids.h"
13 #include "ui/aura/root_window.h"
14 #include "ui/aura/window.h"
15 #endif
16
17 // Note: This file should be removed after the old ChromeOS frontend is removed. 10 // Note: This file should be removed after the old ChromeOS frontend is removed.
18 // It is not needed for Aura. 11 // It is not needed for Aura.
19 // The visual style implemented by BubbleFrameView/BubbleWindow for 12 // The visual style implemented by BubbleFrameView/BubbleWindow for
20 // ChromeOS should move to Ash. 13 // ChromeOS should move to Ash.
21 // Calling code should just call the standard views Widget creation 14 // Calling code should just call the standard views Widget creation
22 // methods and "the right thing" should just happen. 15 // methods and "the right thing" should just happen.
23 // The remainder of the code here is dealing with the legacy CrOS WM and 16 // The remainder of the code here is dealing with the legacy CrOS WM and
24 // can also be removed. 17 // can also be removed.
25 18
26 namespace browser { 19 namespace browser {
27 20
28 views::Widget* CreateFramelessViewsWindow(gfx::NativeWindow parent, 21 views::Widget* CreateFramelessViewsWindow(gfx::NativeWindow parent,
29 views::WidgetDelegate* delegate) { 22 views::WidgetDelegate* delegate) {
30 views::Widget* widget = new views::Widget; 23 views::Widget* widget = new views::Widget;
31 views::Widget::InitParams params( 24 views::Widget::InitParams params(
32 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 25 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
33 params.delegate = delegate; 26 params.delegate = delegate;
34 // Will this function be called if !defined(USE_AURA)? 27 // Will this function be called if !defined(USE_AURA)?
35 #if defined(OS_WIN) || defined(USE_AURA) 28 #if defined(OS_WIN) || defined(USE_AURA)
36 params.parent = parent; 29 params.parent = parent;
37 #endif 30 #endif
38 // No frame so does not need params.transparent = true 31 // No frame so does not need params.transparent = true
39 widget->Init(params); 32 widget->Init(params);
40 return widget; 33 return widget;
41 } 34 }
42 35
43 views::Widget* CreateViewsBubbleAboveLockScreen(
44 views::BubbleDelegateView* delegate) {
45 #if defined(USE_AURA)
46 delegate->set_parent_window(
47 ash::Shell::GetInstance()->GetContainer(
48 ash::internal::kShellWindowId_SettingBubbleContainer));
49 #endif
50 views::Widget* bubble_widget =
51 views::BubbleDelegateView::CreateBubble(delegate);
52 return bubble_widget;
53 }
54
55 } // namespace browser 36 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/window.h ('k') | chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698