summaryrefslogtreecommitdiffstats
path: root/ui/views/widget/widget_test_util.cc
blob: 8382ea8d5ee2e0bb7aa1908431f433b637fc3f69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/widget/widget_test_util.h"

#include "ui/views/view.h"
#include "ui/views/widget/widget.h"

namespace ui {
namespace internal {

Widget* CreateWidget() {
  Widget* widget = new Widget(new View);
  widget->set_delete_on_destroy(false);
  widget->InitWithNativeViewParent(NULL, gfx::Rect(10, 10, 200, 200));
  return widget;
}

Widget* CreateWidgetWithParent(Widget* parent) {
  Widget* widget = new Widget(new View);
  widget->set_delete_on_destroy(false);
  widget->InitWithWidgetParent(parent, gfx::Rect(10, 10, 200, 200));
  return widget;
}

}  // namespace internal
}  // namespace ui