diff options
Diffstat (limited to 'chrome/browser/views/tabs')
-rw-r--r-- | chrome/browser/views/tabs/dragged_tab_controller.cc | 11 | ||||
-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 | 7 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.cc | 13 | ||||
-rw-r--r-- | chrome/browser/views/tabs/tab_strip.h | 4 |
8 files changed, 25 insertions, 28 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc index bb93238..b174dc8 100644 --- a/chrome/browser/views/tabs/dragged_tab_controller.cc +++ b/chrome/browser/views/tabs/dragged_tab_controller.cc @@ -273,8 +273,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); - ChromeViews::View::ConvertPointToViewContainer(first_tab, - &window_create_point_); + ChromeViews::View::ConvertPointToContainer(first_tab, &window_create_point_); } gfx::Point DraggedTabController::GetWindowCreatePoint() const { @@ -386,7 +385,7 @@ void DraggedTabController::MoveTab(const gfx::Point& screen_point) { TabStrip* DraggedTabController::GetTabStripForPoint( const gfx::Point& screen_point) const { - HWND dragged_hwnd = view_->GetViewContainer()->GetHWND(); + HWND dragged_hwnd = view_->GetContainer()->GetHWND(); HWND other_hwnd = WindowFinder::WindowForPoint(screen_point, dragged_hwnd); if (!other_hwnd) return NULL; @@ -487,7 +486,7 @@ void DraggedTabController::Attach(TabStrip* attached_tabstrip, tab->SetVisible(false); // Move the corresponding window to the front. - attached_tabstrip_->GetViewContainer()->MoveToFront(true); + attached_tabstrip_->GetContainer()->MoveToFront(true); } void DraggedTabController::Detach() { @@ -679,7 +678,7 @@ void DraggedTabController::RevertDrag() { // it has been hidden. if (restore_frame) { if (!restore_bounds_.IsEmpty()) { - HWND frame_hwnd = source_tabstrip_->GetViewContainer()->GetHWND(); + HWND frame_hwnd = source_tabstrip_->GetContainer()->GetHWND(); MoveWindow(frame_hwnd, restore_bounds_.x(), restore_bounds_.y(), restore_bounds_.width(), restore_bounds_.height(), TRUE); } @@ -747,7 +746,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_->GetViewContainer()->GetHWND(); + HWND frame_hwnd = source_tabstrip_->GetContainer()->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 5b43500..2c326ba 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/hwnd_view_container.h" +#include "chrome/views/container_win.h" #include "skia/include/SkShader.h" const int kTransparentAlpha = 200; @@ -38,7 +38,7 @@ DraggedTabView::DraggedTabView(TabContents* datasource, renderer_->UpdateData(datasource); - container_ = new ChromeViews::HWNDViewContainer; + container_ = new ChromeViews::ContainerWin; container_->set_window_style(WS_POPUP); container_->set_window_ex_style( WS_EX_LAYERED | WS_EX_TOPMOST | WS_EX_TOOLWINDOW); @@ -106,7 +106,7 @@ void DraggedTabView::AnimateToBounds(const gfx::Rect& bounds, animation_callback_.reset(callback); RECT wr; - GetWindowRect(GetViewContainer()->GetHWND(), &wr); + GetWindowRect(GetContainer()->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 14ba7ec..0f4d626 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 ChromeViews { -class HWNDViewContainer; +class ContainerWin; } namespace gfx { class Point; @@ -76,7 +76,7 @@ class DraggedTabView : public ChromeViews::View, int ScaleValue(int value); // The window that contains the DraggedTabView. - ChromeViews::HWNDViewContainer* container_; + ChromeViews::ContainerWin* 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 a230c6b..5096565 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/hwnd_view_container.h" +#include "chrome/views/container_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 ChromeViews::HWNDViewContainer; + capture_window_ = new ChromeViews::ContainerWin; 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 4de1d14..d3f79bb 100644 --- a/chrome/browser/views/tabs/hwnd_photobooth.h +++ b/chrome/browser/views/tabs/hwnd_photobooth.h @@ -10,7 +10,7 @@ class ChromeCanvas; namespace ChromeViews { -class HWNDViewContainer; +class ContainerWin; } /////////////////////////////////////////////////////////////////////////////// @@ -50,7 +50,7 @@ class HWNDPhotobooth { void CreateCaptureWindow(HWND initial_hwnd); // The nearly off-screen photo-booth layered window used to hold the HWND. - ChromeViews::HWNDViewContainer* capture_window_; + ChromeViews::ContainerWin* 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 8a6f205..a64a073 100644 --- a/chrome/browser/views/tabs/tab.cc +++ b/chrome/browser/views/tabs/tab.cc @@ -5,12 +5,12 @@ #include "chrome/browser/views/tabs/tab.h" #include "base/gfx/size.h" -#include "chrome/views/view_container.h" #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/gfx/path.h" #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 "generated_resources.h" @@ -53,9 +53,8 @@ class TabContextMenuController : public ChromeViews::MenuDelegate { } void RunMenuAt(int x, int y) { - menu_->RunMenuAt(tab_->GetViewContainer()->GetHWND(), - gfx::Rect(x, y, 0, 0), ChromeViews::MenuItemView::TOPLEFT, - true); + menu_->RunMenuAt(tab_->GetContainer()->GetHWND(), gfx::Rect(x, y, 0, 0), + ChromeViews::MenuItemView::TOPLEFT, true); } private: diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index 7158bf0..c4e1371 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -342,10 +342,9 @@ class RemoveTabAnimation : public TabStrip::TabAnimation { } } - // When the animation completes, we send the ViewContainer a message to - // simulate a mouse moved event at the current mouse position. This tickles - // the Tab the mouse is currently over to show the "hot" state of the close - // button. + // When the animation completes, we send the Container a message to simulate + // a mouse moved event at the current mouse position. This tickles the Tab + // the mouse is currently over to show the "hot" state of the close button. void HighlightCloseButton() { if (tabstrip_->available_width_for_tabs_ == -1 || tabstrip_->IsDragSessionActive()) { @@ -356,7 +355,7 @@ class RemoveTabAnimation : public TabStrip::TabAnimation { POINT pt; GetCursorPos(&pt); - ChromeViews::ViewContainer* vc = tabstrip_->GetViewContainer(); + ChromeViews::Container* vc = tabstrip_->GetContainer(); RECT wr; GetWindowRect(vc->GetHWND(), &wr); pt.x -= wr.left; @@ -837,7 +836,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(GetViewContainer()->GetHWND())) { + if (GetTabCount() > 1 && IsWindowVisible(GetContainer()->GetHWND())) { StartInsertTabAnimation(index); } else { Layout(); @@ -1402,7 +1401,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 ChromeViews::HWNDViewContainer(); + arrow_window = new ChromeViews::ContainerWin(); 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 f30f59b..b00268db 100644 --- a/chrome/browser/views/tabs/tab_strip.h +++ b/chrome/browser/views/tabs/tab_strip.h @@ -9,7 +9,7 @@ #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/browser/views/tabs/tab.h" #include "chrome/views/button.h" -#include "chrome/views/hwnd_view_container.h" +#include "chrome/views/container_win.h" #include "chrome/views/menu.h" #include "chrome/views/view.h" @@ -342,7 +342,7 @@ class TabStrip : public ChromeViews::View, bool point_down; // Renders the drop indicator. - ChromeViews::HWNDViewContainer* arrow_window; + ChromeViews::ContainerWin* arrow_window; ChromeViews::ImageView* arrow_view; private: |