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

Side by Side Diff: chrome/browser/chromeos/login/user_controller_gtk.cc

Issue 7129033: Adding a new window type for frameless non-transient top level windows, used by ChromeOS' window ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/user_controller.h" 5 #include "chrome/browser/chromeos/login/user_controller.h"
6 6
7 #include "views/widget/native_widget_gtk.h" 7 #include "views/widget/native_widget_gtk.h"
8 8
9 using views::NativeWidgetGtk; 9 using views::NativeWidgetGtk;
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 UserController* controller_; 53 UserController* controller_;
54 54
55 DISALLOW_COPY_AND_ASSIGN(ClickNotifyingWidget); 55 DISALLOW_COPY_AND_ASSIGN(ClickNotifyingWidget);
56 }; 56 };
57 57
58 views::Widget* InitWidget(views::WidgetDelegate* delegate, 58 views::Widget* InitWidget(views::WidgetDelegate* delegate,
59 views::NativeWidget* native_widget, 59 views::NativeWidget* native_widget,
60 const gfx::Rect& bounds) { 60 const gfx::Rect& bounds) {
61 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 61 views::Widget::InitParams params(
62 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
62 params.delegate = delegate; 63 params.delegate = delegate;
63 params.transparent = true; 64 params.transparent = true;
64 params.bounds = bounds; 65 params.bounds = bounds;
65 params.native_widget = native_widget; 66 params.native_widget = native_widget;
66 native_widget->GetWidget()->Init(params); 67 native_widget->GetWidget()->Init(params);
67 GdkWindow* gdk_window = native_widget->GetWidget()->GetNativeView()->window; 68 GdkWindow* gdk_window = native_widget->GetWidget()->GetNativeView()->window;
68 gdk_window_set_back_pixmap(gdk_window, NULL, false); 69 gdk_window_set_back_pixmap(gdk_window, NULL, false);
69 return native_widget->GetWidget(); 70 return native_widget->GetWidget();
70 } 71 }
71 72
72 } // namespace 73 } // namespace
73 74
74 // static 75 // static
75 views::Widget* UserController::CreateControlsWidget( 76 views::Widget* UserController::CreateControlsWidget(
76 views::WidgetDelegate* delegate, 77 views::WidgetDelegate* delegate,
77 const gfx::Rect& bounds) { 78 const gfx::Rect& bounds) {
78 return InitWidget(delegate, new ControlsWidget(), bounds); 79 return InitWidget(delegate, new ControlsWidget(), bounds);
79 } 80 }
80 81
81 // static 82 // static
82 views::Widget* UserController::CreateClickNotifyingWidget( 83 views::Widget* UserController::CreateClickNotifyingWidget(
83 UserController* controller, 84 UserController* controller,
84 const gfx::Rect& bounds) { 85 const gfx::Rect& bounds) {
85 return InitWidget(controller, new ClickNotifyingWidget(controller), bounds); 86 return InitWidget(controller, new ClickNotifyingWidget(controller), bounds);
86 } 87 }
87 88
88 } // namespace 89 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698