Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4691)

Unified Diff: chrome/views/custom_frame_window.cc

Issue 19728: Fix Aero Basic (i.e. non-glass) maximized mode drawing. This old hack was in... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/custom_frame_window.cc
===================================================================
--- chrome/views/custom_frame_window.cc (revision 8989)
+++ chrome/views/custom_frame_window.cc (working copy)
@@ -858,45 +858,6 @@
}
///////////////////////////////////////////////////////////////////////////////
-// NonClientViewLayout
-
-class NonClientViewLayout : public LayoutManager {
- public:
- // The size of the default window border and padding used by Windows Vista
- // with DWM disabled when clipping the window for maximized display.
- // TODO(beng): figure out how to get this programmatically, since it varies
- // with adjustments to the Windows Border/Padding setting.
- static const int kBorderAndPadding = 8;
-
- NonClientViewLayout(View* child, Window* window)
- : child_(child),
- window_(window) {
- }
- virtual ~NonClientViewLayout() {}
-
- // Overridden from LayoutManager:
- virtual void Layout(View* host) {
- int horizontal_border_width =
- window_->IsMaximized() ? kBorderAndPadding : 0;
- int vertical_border_height =
- window_->IsMaximized() ? kBorderAndPadding : 0;
-
- child_->SetBounds(horizontal_border_width, vertical_border_height,
- host->width() - (2 * horizontal_border_width),
- host->height() - (2 * vertical_border_height));
- }
- virtual gfx::Size GetPreferredSize(View* host) {
- return child_->GetPreferredSize();
- }
-
- private:
- View* child_;
- Window* window_;
-
- DISALLOW_COPY_AND_ASSIGN(NonClientViewLayout);
-};
-
-///////////////////////////////////////////////////////////////////////////////
// CustomFrameWindow, public:
CustomFrameWindow::CustomFrameWindow(WindowDelegate* window_delegate)
@@ -929,13 +890,6 @@
non_client_view_ = new DefaultNonClientView(this);
Window::Init(parent, bounds);
- // Windows Vista non-Aero-glass does wacky things with maximized windows that
- // require a special layout manager to compensate for.
- if (win_util::GetWinVersion() >= win_util::WINVERSION_VISTA) {
- GetRootView()->SetLayoutManager(
- new NonClientViewLayout(non_client_view_, this));
- }
-
ResetWindowRegion();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698