From 2fdd00a4c6a07856180347c6d147b27c10ae14ff Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Mon, 13 Jun 2011 21:56:26 +0000 Subject: Eliminate Window completely. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7108047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88905 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/button/button_dropdown.cc | 1 - views/controls/button/menu_button.cc | 1 - views/controls/combobox/native_combobox_views.cc | 2 +- views/controls/scrollbar/bitmap_scroll_bar.cc | 1 - views/controls/scrollbar/native_scroll_bar_win.cc | 10 ++++----- views/controls/tabbed_pane/tabbed_pane_unittest.cc | 11 +++++----- views/controls/table/table_view_unittest.cc | 24 +++++++++++----------- views/controls/textfield/native_textfield_views.cc | 1 - 8 files changed, 24 insertions(+), 27 deletions(-) (limited to 'views/controls') diff --git a/views/controls/button/button_dropdown.cc b/views/controls/button/button_dropdown.cc index 0eb6d2f..dc893df 100644 --- a/views/controls/button/button_dropdown.cc +++ b/views/controls/button/button_dropdown.cc @@ -14,7 +14,6 @@ #include "views/controls/menu/menu_item_view.h" #include "views/controls/menu/menu_model_adapter.h" #include "views/widget/widget.h" -#include "views/window/window.h" namespace views { diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc index 0e5d702..3c8bbed 100644 --- a/views/controls/button/menu_button.cc +++ b/views/controls/button/menu_button.cc @@ -18,7 +18,6 @@ #include "views/screen.h" #include "views/widget/root_view.h" #include "views/widget/widget.h" -#include "views/window/window.h" using base::Time; using base::TimeDelta; diff --git a/views/controls/combobox/native_combobox_views.cc b/views/controls/combobox/native_combobox_views.cc index 10e197f..cf34ac1 100644 --- a/views/controls/combobox/native_combobox_views.cc +++ b/views/controls/combobox/native_combobox_views.cc @@ -20,7 +20,7 @@ #include "views/controls/focusable_border.h" #include "views/controls/menu/submenu_view.h" #include "views/widget/root_view.h" -#include "views/window/window.h" +#include "views/widget/widget.h" #if defined(OS_LINUX) #include "ui/gfx/gtk_util.h" diff --git a/views/controls/scrollbar/bitmap_scroll_bar.cc b/views/controls/scrollbar/bitmap_scroll_bar.cc index 20a1a96..2785987 100644 --- a/views/controls/scrollbar/bitmap_scroll_bar.cc +++ b/views/controls/scrollbar/bitmap_scroll_bar.cc @@ -21,7 +21,6 @@ #include "views/controls/menu/menu.h" #include "views/controls/scroll_view.h" #include "views/widget/widget.h" -#include "views/window/window.h" #undef min #undef max diff --git a/views/controls/scrollbar/native_scroll_bar_win.cc b/views/controls/scrollbar/native_scroll_bar_win.cc index 7c1b5d7..e46e52a 100644 --- a/views/controls/scrollbar/native_scroll_bar_win.cc +++ b/views/controls/scrollbar/native_scroll_bar_win.cc @@ -75,11 +75,11 @@ class ScrollBarContainer : public ui::WindowImpl { private: LRESULT OnCreate(LPCREATESTRUCT create_struct) { - scrollbar_ = CreateWindow(L"SCROLLBAR", L"", - WS_CHILD | (parent_->IsHorizontal() ? - SBS_HORZ : SBS_VERT), - 0, 0, parent_->width(), parent_->height(), - hwnd(), NULL, NULL, NULL); + scrollbar_ = CreateWindowW(L"SCROLLBAR", L"", + WS_CHILD | (parent_->IsHorizontal() ? + SBS_HORZ : SBS_VERT), + 0, 0, parent_->width(), parent_->height(), + hwnd(), NULL, NULL, NULL); ui::CheckWindowCreated(scrollbar_); ShowWindow(scrollbar_, SW_SHOW); return 1; diff --git a/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/views/controls/tabbed_pane/tabbed_pane_unittest.cc index 1ceef86..12f82a5 100644 --- a/views/controls/tabbed_pane/tabbed_pane_unittest.cc +++ b/views/controls/tabbed_pane/tabbed_pane_unittest.cc @@ -5,8 +5,8 @@ #include "base/message_loop.h" #include "testing/gtest/include/gtest/gtest.h" #include "views/controls/tabbed_pane/tabbed_pane.h" -#include "views/window/window.h" -#include "views/window/window_delegate.h" +#include "views/widget/widget.h" +#include "views/widget/widget_delegate.h" namespace views { @@ -26,7 +26,8 @@ class FixedSizeView : public View { DISALLOW_COPY_AND_ASSIGN(FixedSizeView); }; -class TabbedPaneTest : public testing::Test, WindowDelegate { +class TabbedPaneTest : public testing::Test, + public WidgetDelegate { public: TabbedPaneTest() {} @@ -39,7 +40,7 @@ class TabbedPaneTest : public testing::Test, WindowDelegate { private: virtual void SetUp() { tabbed_pane_ = new TabbedPane(); - window_ = Window::CreateChromeWindow(NULL, gfx::Rect(0, 0, 100, 100), this); + window_ = Widget::CreateWindowWithBounds(this, gfx::Rect(0, 0, 100, 100)); window_->Show(); } @@ -53,7 +54,7 @@ class TabbedPaneTest : public testing::Test, WindowDelegate { } MessageLoopForUI message_loop_; - Window* window_; + Widget* window_; DISALLOW_COPY_AND_ASSIGN(TabbedPaneTest); }; diff --git a/views/controls/table/table_view_unittest.cc b/views/controls/table/table_view_unittest.cc index 572ace2..ee6734b 100644 --- a/views/controls/table/table_view_unittest.cc +++ b/views/controls/table/table_view_unittest.cc @@ -20,8 +20,8 @@ #include "ui/base/models/table_model_observer.h" #include "views/controls/table/table_view.h" #include "views/controls/table/table_view2.h" -#include "views/window/window.h" -#include "views/window/window_delegate.h" +#include "views/widget/widget.h" +#include "views/widget/widget_delegate.h" using ui::TableModel; using ui::TableModelObserver; // TODO(beng): remove these @@ -139,7 +139,7 @@ int TestTableModel::CompareValues(int row1, int row2, int column_id) { // TableViewTest --------------------------------------------------------------- -class TableViewTest : public testing::Test, views::WindowDelegate { +class TableViewTest : public testing::Test, views::WidgetDelegate { public: virtual void SetUp(); virtual void TearDown(); @@ -174,7 +174,7 @@ class TableViewTest : public testing::Test, views::WindowDelegate { private: MessageLoopForUI message_loop_; - views::Window* window_; + views::Widget* window_; }; void TableViewTest::SetUp() { @@ -186,9 +186,9 @@ void TableViewTest::SetUp() { columns[1].id = 1; table_ = new TableView(model_.get(), columns, views::ICON_AND_TEXT, false, false, false); - window_ = - views::Window::CreateChromeWindow(NULL, gfx::Rect(100, 100, 512, 512), - this); + window_ = views::Widget::CreateWindowWithBounds( + this, + gfx::Rect(100, 100, 512, 512)); } void TableViewTest::TearDown() { @@ -466,7 +466,7 @@ TEST_F(NullModelTableViewTest, DISABLED_NullModel) { //////////////////////////////////////////////////////////////////////////////// // TableView2 Tests -class TableView2Test : public testing::Test, views::WindowDelegate { +class TableView2Test : public testing::Test, views::WidgetDelegate { public: virtual void SetUp(); virtual void TearDown(); @@ -493,7 +493,7 @@ class TableView2Test : public testing::Test, views::WindowDelegate { private: MessageLoopForUI message_loop_; - views::Window* window_; + views::Widget* window_; }; void TableView2Test::SetUp() { @@ -507,9 +507,9 @@ void TableView2Test::SetUp() { columns[1].id = 1; table_ = new views::TableView2(model_.get(), columns, GetTableType(), views::TableView2::NONE); - window_ = views::Window::CreateChromeWindow(NULL, - gfx::Rect(100, 100, 512, 512), - this); + window_ = views::Widget::CreateWindowWithBounds( + this, + gfx::Rect(100, 100, 512, 512)); window_->Show(); } diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc index 2204913..423b6eb 100644 --- a/views/controls/textfield/native_textfield_views.cc +++ b/views/controls/textfield/native_textfield_views.cc @@ -30,7 +30,6 @@ #include "views/metrics.h" #include "views/views_delegate.h" #include "views/widget/widget.h" -#include "views/window/window.h" #if defined(OS_LINUX) #include "ui/gfx/gtk_util.h" -- cgit v1.1