summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 04:19:37 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 04:19:37 +0000
commit41d817ad1ba6ce0a7bad99934dfdc34333641668 (patch)
tree455a49264ec84dcb9426e66db796db3c35c13124
parent4b47a84cfe39e2769369143706efe363b81dde22 (diff)
downloadchromium_src-41d817ad1ba6ce0a7bad99934dfdc34333641668.zip
chromium_src-41d817ad1ba6ce0a7bad99934dfdc34333641668.tar.gz
chromium_src-41d817ad1ba6ce0a7bad99934dfdc34333641668.tar.bz2
Hack and slash TabStrip2 into mostly working state - DWM frame is now properly adjusted with --enable-tabtastic2, tab text doesn't cause black squares to be rendered etc.Also, remove some code invalidated by my fix earlier this week to make the distributor logo not overlap the window controls.BUG=noneTEST=none
Review URL: http://codereview.chromium.org/155267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20240 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/frame/browser_frame_win.cc11
-rw-r--r--chrome/browser/views/tabs/tab_strip_2.cc4
-rw-r--r--chrome/browser/views/tabs/tab_strip_2.h1
3 files changed, 1 insertions, 15 deletions
diff --git a/chrome/browser/views/frame/browser_frame_win.cc b/chrome/browser/views/frame/browser_frame_win.cc
index 7543f87..206f05f 100644
--- a/chrome/browser/views/frame/browser_frame_win.cc
+++ b/chrome/browser/views/frame/browser_frame_win.cc
@@ -237,15 +237,6 @@ LRESULT BrowserFrameWin::OnNCCalcSize(BOOL mode, LPARAM l_param) {
UpdateDWMFrame();
- // Non-client metrics such as the window control positions may change as a
- // result of us processing this message so we need to re-layout the frame view
- // which may position items (such as the distributor logo) based on these
- // metrics. We only do this once the non-client view has been properly
- // initialized and added to the view hierarchy.
- views::NonClientView* non_client_view = GetNonClientView();
- if (non_client_view && non_client_view->GetParent())
- non_client_view->LayoutFrameView();
-
// We'd like to return WVR_REDRAW in some cases here, but because we almost
// always have nonclient area (except in fullscreen mode, where it doesn't
// matter), we can't. See comments in window.cc:OnNCCalcSize() for more info.
@@ -354,7 +345,7 @@ void BrowserFrameWin::UpdateDWMFrame() {
}
// In maximized mode, we only have a titlebar strip of glass, no side/bottom
// borders.
- if (!browser_view_->IsFullscreen() && !TabStrip2::Enabled()) {
+ if (!browser_view_->IsFullscreen()) {
margins.cyTopHeight =
GetBoundsForTabStrip(browser_view_->tabstrip()).bottom();
}
diff --git a/chrome/browser/views/tabs/tab_strip_2.cc b/chrome/browser/views/tabs/tab_strip_2.cc
index 1f24b2f..782b700 100644
--- a/chrome/browser/views/tabs/tab_strip_2.cc
+++ b/chrome/browser/views/tabs/tab_strip_2.cc
@@ -258,10 +258,6 @@ void TabStrip2::Layout() {
LayoutImpl(LS_OTHER);
}
-void TabStrip2::Paint(gfx::Canvas* canvas) {
- canvas->FillRectInt(SK_ColorBLUE, 0, 0, width(), height());
-}
-
void TabStrip2::PaintChildren(gfx::Canvas* canvas) {
// Paint the tabs in reverse order, so they stack to the left.
Tab2* selected_tab = NULL;
diff --git a/chrome/browser/views/tabs/tab_strip_2.h b/chrome/browser/views/tabs/tab_strip_2.h
index 3096b08..793159c 100644
--- a/chrome/browser/views/tabs/tab_strip_2.h
+++ b/chrome/browser/views/tabs/tab_strip_2.h
@@ -99,7 +99,6 @@ class TabStrip2 : public views::View,
// Overridden from views::View:
virtual gfx::Size GetPreferredSize();
virtual void Layout();
- virtual void Paint(gfx::Canvas* canvas);
private:
virtual void PaintChildren(gfx::Canvas* canvas);