diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:51:20 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 20:51:20 +0000 |
commit | a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd (patch) | |
tree | d8283a980977f11c43542016d57f698d3a83b73d /chrome/browser/views/tabs | |
parent | 933cc00eb856db684b9e64b7486ca20edbb2c3ea (diff) | |
download | chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.zip chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.gz chromium_src-a0dde12f2e4f92f1a59885c45cfecd10dbfdfdfd.tar.bz2 |
Rename Container->Widget
R=erg
review url = http://codereview.chromium.org/11348/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5849 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs')
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.cc | 18 | ||||
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/views/tabs/hwnd_photobooth.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/tabs/hwnd_photobooth.h | 4 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.cc | 10 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.h | 4 |
8 files changed, 27 insertions, 27 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc index c88920a..b0a162d 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/views/tabs/dragged_tab_controller.cc @@ -208,7 +208,7 @@ class DraggedTabController::DockDisplayer : public AnimationDelegate { break; } - popup_ = new views::ContainerWin; + popup_ = new views::WidgetWin; popup_->set_window_style(WS_POPUP); popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | WS_EX_TOPMOST); @@ -282,7 +282,7 @@ class DraggedTabController::DockDisplayer : public AnimationDelegate { DraggedTabController* controller_; // Window we're showing. - views::ContainerWin* popup_; + views::WidgetWin* popup_; // HWND of |popup_|. We cache this to avoid the possibility of invoking a // method on popup_ after we close it. @@ -502,7 +502,7 @@ void DraggedTabController::DidProcessMessage(const MSG& msg) { void DraggedTabController::InitWindowCreatePoint() { window_create_point_.SetPoint(mouse_offset_.x(), mouse_offset_.y()); Tab* first_tab = attached_tabstrip_->GetTabAt(0); - views::View::ConvertPointToContainer(first_tab, &window_create_point_); + views::View::ConvertPointToWidget(first_tab, &window_create_point_); } gfx::Point DraggedTabController::GetWindowCreatePoint() const { @@ -664,7 +664,7 @@ DockInfo DraggedTabController::GetDockInfoAtPoint( return dock_info_; } - HWND dragged_hwnd = view_->GetContainer()->GetHWND(); + HWND dragged_hwnd = view_->GetWidget()->GetHWND(); dock_windows_.insert(dragged_hwnd); DockInfo info = DockInfo::GetDockInfoAtPoint(screen_point, dock_windows_); dock_windows_.erase(dragged_hwnd); @@ -673,7 +673,7 @@ DockInfo DraggedTabController::GetDockInfoAtPoint( TabStrip* DraggedTabController::GetTabStripForPoint( const gfx::Point& screen_point) { - HWND dragged_hwnd = view_->GetContainer()->GetHWND(); + HWND dragged_hwnd = view_->GetWidget()->GetHWND(); dock_windows_.insert(dragged_hwnd); HWND local_window = DockInfo::GetLocalProcessWindowAtPoint(screen_point, dock_windows_); @@ -776,7 +776,7 @@ void DraggedTabController::Attach(TabStrip* attached_tabstrip, tab->SetVisible(false); // Move the corresponding window to the front. - attached_tabstrip_->GetContainer()->MoveToFront(true); + attached_tabstrip_->GetWidget()->MoveToFront(true); } void DraggedTabController::Detach() { @@ -984,7 +984,7 @@ void DraggedTabController::RevertDrag() { // it has been hidden. if (restore_frame) { if (!restore_bounds_.IsEmpty()) { - HWND frame_hwnd = source_tabstrip_->GetContainer()->GetHWND(); + HWND frame_hwnd = source_tabstrip_->GetWidget()->GetHWND(); MoveWindow(frame_hwnd, restore_bounds_.x(), restore_bounds_.y(), restore_bounds_.width(), restore_bounds_.height(), TRUE); } @@ -1052,7 +1052,7 @@ bool DraggedTabController::CompleteDrag() { } // Compel the model to construct a new window for the detached TabContents. CRect browser_rect; - GetWindowRect(source_tabstrip_->GetContainer()->GetHWND(), &browser_rect); + GetWindowRect(source_tabstrip_->GetWidget()->GetHWND(), &browser_rect); gfx::Rect window_bounds( GetWindowCreatePoint(), gfx::Size(browser_rect.Width(), browser_rect.Height())); @@ -1101,7 +1101,7 @@ int DraggedTabController::NormalizeIndexToAttachedTabStrip(int index) const { void DraggedTabController::HideFrame() { // We don't actually hide the window, rather we just move it way off-screen. // If we actually hide it, we stop receiving drag events. - HWND frame_hwnd = source_tabstrip_->GetContainer()->GetHWND(); + HWND frame_hwnd = source_tabstrip_->GetWidget()->GetHWND(); RECT wr; GetWindowRect(frame_hwnd, &wr); MoveWindow(frame_hwnd, 0xFFFF, 0xFFFF, wr.right - wr.left, diff --git a/chrome/browser/views/tabs/dragged_tab_view.cc b/chrome/browser/views/tabs/dragged_tab_view.cc index 6f20c6a..9aaeee1 100644 --- a/chrome/browser/views/tabs/dragged_tab_view.cc +++ b/chrome/browser/views/tabs/dragged_tab_view.cc @@ -9,7 +9,7 @@ #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/views/tabs/hwnd_photobooth.h" #include "chrome/browser/views/tabs/tab_renderer.h" -#include "chrome/views/container_win.h" +#include "chrome/views/widget_win.h" #include "skia/include/SkShader.h" const int kTransparentAlpha = 200; @@ -38,7 +38,7 @@ DraggedTabView::DraggedTabView(TabContents* datasource, renderer_->UpdateData(datasource); - container_.reset(new views::ContainerWin); + container_.reset(new views::WidgetWin); container_->set_delete_on_destroy(false); container_->set_window_style(WS_POPUP); container_->set_window_ex_style( @@ -107,7 +107,7 @@ void DraggedTabView::AnimateToBounds(const gfx::Rect& bounds, animation_callback_.reset(callback); RECT wr; - GetWindowRect(GetContainer()->GetHWND(), &wr); + GetWindowRect(GetWidget()->GetHWND(), &wr); animation_start_bounds_ = wr; animation_end_bounds_ = bounds; diff --git a/chrome/browser/views/tabs/dragged_tab_view.h b/chrome/browser/views/tabs/dragged_tab_view.h index be809f4..e219a5d 100644 --- a/chrome/browser/views/tabs/dragged_tab_view.h +++ b/chrome/browser/views/tabs/dragged_tab_view.h @@ -13,7 +13,7 @@ #include "skia/include/SkBitmap.h" namespace views { -class ContainerWin; +class WidgetWin; } namespace gfx { class Point; @@ -76,7 +76,7 @@ class DraggedTabView : public views::View, int ScaleValue(int value); // The window that contains the DraggedTabView. - scoped_ptr<views::ContainerWin> container_; + scoped_ptr<views::WidgetWin> container_; // The renderer that paints the Tab shape. scoped_ptr<TabRenderer> renderer_; diff --git a/chrome/browser/views/tabs/hwnd_photobooth.cc b/chrome/browser/views/tabs/hwnd_photobooth.cc index 052c4aa..19e130c 100644 --- a/chrome/browser/views/tabs/hwnd_photobooth.cc +++ b/chrome/browser/views/tabs/hwnd_photobooth.cc @@ -6,7 +6,7 @@ #include "chrome/browser/tab_contents.h" #include "chrome/browser/views/tabs/hwnd_photobooth.h" #include "chrome/common/gfx/chrome_canvas.h" -#include "chrome/views/container_win.h" +#include "chrome/views/widget_win.h" #include "skia/include/SkBitmap.h" namespace { @@ -143,7 +143,7 @@ void HWNDPhotobooth::CreateCaptureWindow(HWND initial_hwnd) { gfx::Point window_position = GetCaptureWindowPosition(); gfx::Rect capture_bounds(window_position.x(), window_position.y(), contents_rect.Width(), contents_rect.Height()); - capture_window_ = new views::ContainerWin; + capture_window_ = new views::WidgetWin; capture_window_->set_window_style(WS_POPUP); // WS_EX_TOOLWINDOW ensures the capture window doesn't produce a Taskbar // button. diff --git a/chrome/browser/views/tabs/hwnd_photobooth.h b/chrome/browser/views/tabs/hwnd_photobooth.h index e3fb423..56a5eb2 100644 --- a/chrome/browser/views/tabs/hwnd_photobooth.h +++ b/chrome/browser/views/tabs/hwnd_photobooth.h @@ -10,7 +10,7 @@ class ChromeCanvas; namespace views { -class ContainerWin; +class WidgetWin; } /////////////////////////////////////////////////////////////////////////////// @@ -50,7 +50,7 @@ class HWNDPhotobooth { void CreateCaptureWindow(HWND initial_hwnd); // The nearly off-screen photo-booth layered window used to hold the HWND. - views::ContainerWin* capture_window_; + views::WidgetWin* capture_window_; // The current HWND being captured. HWND current_hwnd_; diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc index e170b76..d4b28ac 100644 --- a/chrome/browser/views/tabs/tab.cc +++ b/chrome/browser/views/tabs/tab.cc @@ -10,8 +10,8 @@ #include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" #include "chrome/views/chrome_menu.h" -#include "chrome/views/container.h" #include "chrome/views/tooltip_manager.h" +#include "chrome/views/widget.h" #include "generated_resources.h" const std::string Tab::kTabClassName = "browser/tabs/Tab"; @@ -53,7 +53,7 @@ class TabContextMenuController : public views::MenuDelegate { } void RunMenuAt(int x, int y) { - menu_->RunMenuAt(tab_->GetContainer()->GetHWND(), gfx::Rect(x, y, 0, 0), + menu_->RunMenuAt(tab_->GetWidget()->GetHWND(), gfx::Rect(x, y, 0, 0), views::MenuItemView::TOPLEFT, true); } diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index 0f7a743..eb344c0 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -354,15 +354,15 @@ class RemoveTabAnimation : public TabStrip::TabAnimation { POINT pt; GetCursorPos(&pt); - views::Container* vc = tabstrip_->GetContainer(); + views::Widget* widget = tabstrip_->GetWidget(); RECT wr; - GetWindowRect(vc->GetHWND(), &wr); + GetWindowRect(widget->GetHWND(), &wr); pt.x -= wr.left; pt.y -= wr.top; // Return to message loop - otherwise we may disrupt some operation that's // in progress. - PostMessage(vc->GetHWND(), WM_MOUSEMOVE, 0, MAKELPARAM(pt.x, pt.y)); + PostMessage(widget->GetHWND(), WM_MOUSEMOVE, 0, MAKELPARAM(pt.x, pt.y)); } int index_; @@ -845,7 +845,7 @@ void TabStrip::TabInsertedAt(TabContents* contents, // Don't animate the first tab, it looks weird, and don't animate anything // if the containing window isn't visible yet. - if (GetTabCount() > 1 && IsWindowVisible(GetContainer()->GetHWND())) { + if (GetTabCount() > 1 && IsWindowVisible(GetWidget()->GetHWND())) { StartInsertTabAnimation(index); } else { Layout(); @@ -1369,7 +1369,7 @@ TabStrip::DropInfo::DropInfo(int drop_index, bool drop_before, bool point_down) : drop_index(drop_index), drop_before(drop_before), point_down(point_down) { - arrow_window = new views::ContainerWin; + arrow_window = new views::WidgetWin; arrow_window->set_window_style(WS_POPUP); arrow_window->set_window_ex_style(WS_EX_TOPMOST | WS_EX_NOACTIVATE | WS_EX_LAYERED | WS_EX_TRANSPARENT); diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h index 360ab41..e3389ab 100644 --- a/chrome/browser/views/tabs/tab_strip.h +++ b/chrome/browser/views/tabs/tab_strip.h @@ -9,9 +9,9 @@ #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/views/tabs/tab.h" #include "chrome/views/button.h" -#include "chrome/views/container_win.h" #include "chrome/views/menu.h" #include "chrome/views/view.h" +#include "chrome/views/widget_win.h" class DraggedTabController; class ScopedMouseCloseWidthCalculator; @@ -332,7 +332,7 @@ class TabStrip : public views::View, bool point_down; // Renders the drop indicator. - views::ContainerWin* arrow_window; + views::WidgetWin* arrow_window; views::ImageView* arrow_view; private: |