summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:04:39 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:04:39 +0000
commit5b54a5c0327ea3ac2c13cff37573ccd4e7f41e57 (patch)
treee6137bcd166e3a5b83dbdc4a997099597dd7d82f /views/window
parent6775e40aeb887f15dc9182b250cdc4100aa79ce0 (diff)
downloadchromium_src-5b54a5c0327ea3ac2c13cff37573ccd4e7f41e57.zip
chromium_src-5b54a5c0327ea3ac2c13cff37573ccd4e7f41e57.tar.gz
chromium_src-5b54a5c0327ea3ac2c13cff37573ccd4e7f41e57.tar.bz2
Two things:
- simplify root view sizing. - move focus manager creation/management to Widget BUG=72040 TEST=existing unittests Review URL: http://codereview.chromium.org/6609026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r--views/window/window_win.cc22
-rw-r--r--views/window/window_win.h1
2 files changed, 1 insertions, 22 deletions
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 48d3aab..a7abd23 100644
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -596,11 +596,6 @@ void WindowWin::FrameTypeChanged() {
SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER |
SWP_NOOWNERZORDER | SWP_NOACTIVATE);
- // The frame type change results in the client rect changing size, but this
- // does not explicitly send a WM_SIZE, so we need to force the root view to
- // be resized now.
- LayoutRootView();
-
// Update the non-client view with the correct frame view for the active frame
// type.
non_client_view_->UpdateFrame();
@@ -717,7 +712,7 @@ gfx::Insets WindowWin::GetClientAreaInsets() const {
// something else. If the client area is not the window rect in both
// modes, the blackness doesn't occur. Because of this, we need to tell
// the RootView to lay out to fit the window rect, rather than the client
- // rect when using the opaque frame. See GetRootViewSize.
+ // rect when using the opaque frame.
// Note: this is only required for non-fullscreen windows. Note that
// fullscreen windows are in restored state, not maximized.
return gfx::Insets(0, 0, IsFullscreen() ? 0 : 1, 0);
@@ -1101,7 +1096,6 @@ void WindowWin::OnSize(UINT size_param, const CSize& new_size) {
// and maximized bounds are the same, then we need to layout (because we
// layout differently when maximized).
SaveWindowPosition();
- LayoutRootView();
RedrawWindow(GetNativeView(), NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);
// ResetWindowRegion is going to trigger WM_NCPAINT. By doing it after we've
@@ -1228,20 +1222,6 @@ void WindowWin::OnWindowPosChanging(WINDOWPOS* window_pos) {
WidgetWin::OnWindowPosChanging(window_pos);
}
-gfx::Size WindowWin::GetRootViewSize() const {
- // The native frame and maximized modes need to supply the client rect as
- // determined by the relevant WM_NCCALCSIZE handling, so we just use the
- // default handling which does this.
- if (GetNonClientView()->UseNativeFrame() || IsMaximized())
- return WidgetWin::GetRootViewSize();
-
- // When using an opaque frame, we consider the entire window rect to be client
- // area visually.
- CRect rect;
- GetWindowRect(&rect);
- return gfx::Size(rect.Width(), rect.Height());
-}
-
////////////////////////////////////////////////////////////////////////////////
// WindowWin, private:
diff --git a/views/window/window_win.h b/views/window/window_win.h
index 5d0ab5e..8e5c4dc 100644
--- a/views/window/window_win.h
+++ b/views/window/window_win.h
@@ -154,7 +154,6 @@ class WindowWin : public WidgetWin,
virtual void OnWindowPosChanging(WINDOWPOS* window_pos);
virtual Window* GetWindow() { return this; }
virtual const Window* GetWindow() const { return this; }
- virtual gfx::Size GetRootViewSize() const;
// Accessor for disable_inactive_rendering_.
bool disable_inactive_rendering() const {