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

Side by Side Diff: ui/views/widget/native_widget_test_utils_win.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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 "views/widget/native_widget_test_utils.h" 5 #include "ui/views/widget/native_widget_test_utils.h"
6 6
7 #include "ui/views/widget/native_widget_private.h"
8 #include "ui/views/widget/widget.h"
7 #include "views/view.h" 9 #include "views/view.h"
8 #include "views/widget/native_widget_private.h"
9 #include "views/widget/widget.h"
10 10
11 namespace views { 11 namespace views {
12 namespace internal { 12 namespace internal {
13 13
14 namespace { 14 namespace {
15 15
16 NativeWidgetPrivate* CreateNativeWidgetOfType(Widget::InitParams::Type type) { 16 NativeWidgetPrivate* CreateNativeWidgetOfType(Widget::InitParams::Type type) {
17 Widget* widget = new Widget; 17 Widget* widget = new Widget;
18 Widget::InitParams params(type); 18 Widget::InitParams params(type);
19 params.ownership = views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET; 19 params.ownership = views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET;
20 params.child = false; // Implicitly set to true by ctor with TYPE_CONTROL. 20 params.child = false; // Implicitly set to true by ctor with TYPE_CONTROL.
21 params.bounds = gfx::Rect(10, 10, 200, 200); 21 params.bounds = gfx::Rect(10, 10, 200, 200);
22 widget->Init(params); 22 widget->Init(params);
23 return widget->native_widget_private(); 23 return widget->native_widget_private();
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 NativeWidgetPrivate* CreateNativeWidget() { 28 NativeWidgetPrivate* CreateNativeWidget() {
29 return CreateNativeWidgetOfType(Widget::InitParams::TYPE_POPUP); 29 return CreateNativeWidgetOfType(Widget::InitParams::TYPE_POPUP);
30 } 30 }
31 31
32 NativeWidgetPrivate* CreateNativeSubWidget() { 32 NativeWidgetPrivate* CreateNativeSubWidget() {
33 return CreateNativeWidgetOfType(Widget::InitParams::TYPE_CONTROL); 33 return CreateNativeWidgetOfType(Widget::InitParams::TYPE_CONTROL);
34 } 34 }
35 35
36 } // namespace internal 36 } // namespace internal
37 } // namespace ui 37 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_test_utils_gtk.cc ('k') | ui/views/widget/native_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698