diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-07 22:03:10 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-07 22:03:10 +0000 |
commit | 94098fe02a8c5950df6453ccca7621a2d2a6816f (patch) | |
tree | 202c8855a76a7e11bb88fb46fe409a3c4d0888cd /chrome/browser/ui/views/constrained_window_win.cc | |
parent | 172f155f817cc56e1ca36bee6aeeca7f8f95bb64 (diff) | |
download | chromium_src-94098fe02a8c5950df6453ccca7621a2d2a6816f.zip chromium_src-94098fe02a8c5950df6453ccca7621a2d2a6816f.tar.gz chromium_src-94098fe02a8c5950df6453ccca7621a2d2a6816f.tar.bz2 |
Move WindowDelegate and NonClientView creation and management to Window.
This makes WindowGtk/WindowWin a little uglier for now, will improve with consolidation of more functions into Window.
BUG=72040
TEST=none
Review URL: http://codereview.chromium.org/6621033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/constrained_window_win.cc')
-rw-r--r-- | chrome/browser/ui/views/constrained_window_win.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/ui/views/constrained_window_win.cc b/chrome/browser/ui/views/constrained_window_win.cc index 2f3f932..641d542 100644 --- a/chrome/browser/ui/views/constrained_window_win.cc +++ b/chrome/browser/ui/views/constrained_window_win.cc @@ -308,7 +308,7 @@ int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) { if (!bounds().Contains(point)) return HTNOWHERE; - int frame_component = container_->GetClientView()->NonClientHitTest(point); + int frame_component = container_->client_view()->NonClientHitTest(point); // See if we're in the sysmenu region. (We check the ClientView first to be // consistent with OpaqueBrowserFrameView; it's not really necessary here.) @@ -326,7 +326,7 @@ int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) { int window_component = GetHTComponentForFrame(point, kFrameBorderThickness, NonClientBorderThickness(), kResizeAreaCornerSize, kResizeAreaCornerSize, - container_->GetDelegate()->CanResize()); + container_->window_delegate()->CanResize()); // Fall back to the caption if no other component matches. return (window_component == HTNOWHERE) ? HTCAPTION : window_component; } @@ -566,15 +566,15 @@ views::NonClientFrameView* ConstrainedWindowWin::CreateFrameViewForWindow() { void ConstrainedWindowWin::FocusConstrainedWindow() { if ((!owner_->delegate() || owner_->delegate()->ShouldFocusConstrainedWindow()) && - GetDelegate() && GetDelegate()->GetInitiallyFocusedView()) { - GetDelegate()->GetInitiallyFocusedView()->RequestFocus(); + window_delegate() && window_delegate()->GetInitiallyFocusedView()) { + window_delegate()->GetInitiallyFocusedView()->RequestFocus(); } } void ConstrainedWindowWin::ShowConstrainedWindow() { // We marked the view as hidden during construction. Mark it as // visible now so FocusManager will let us receive focus. - GetNonClientView()->SetVisible(true); + non_client_view()->SetVisible(true); if (owner_->delegate()) owner_->delegate()->WillShowConstrainedWindow(owner_); ActivateConstrainedWindow(); @@ -593,8 +593,8 @@ void ConstrainedWindowWin::CloseConstrainedWindow() { } std::wstring ConstrainedWindowWin::GetWindowTitle() const { - if (GetDelegate()) - return GetDelegate()->GetWindowTitle(); + if (window_delegate()) + return window_delegate()->GetWindowTitle(); // TODO(pkasting): Shouldn't this be using a localized string, or else calling // NOTREACHED()? @@ -613,7 +613,7 @@ ConstrainedWindowWin::ConstrainedWindowWin( views::WindowDelegate* window_delegate) : WindowWin(window_delegate), owner_(owner) { - GetNonClientView()->SetFrameView(CreateFrameViewForWindow()); + non_client_view()->SetFrameView(CreateFrameViewForWindow()); set_window_style(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_THICKFRAME | WS_SYSMENU); @@ -621,7 +621,7 @@ ConstrainedWindowWin::ConstrainedWindowWin( // Views default to visible. Since we are creating a window that is // not visible (no WS_VISIBLE), mark our View as hidden so that // FocusManager can deal with it properly. - GetNonClientView()->SetVisible(false); + non_client_view()->SetVisible(false); WindowWin::Init(owner_->GetNativeView(), gfx::Rect()); } @@ -667,7 +667,7 @@ void ConstrainedWindowWin::OnWindowPosChanged(WINDOWPOS* window_pos) { // If the window was moved or sized, tell the owner. if (!(window_pos->flags & SWP_NOMOVE) || !(window_pos->flags & SWP_NOSIZE)) owner_->DidMoveOrResize(this); - SetMsgHandled(FALSE); + WindowWin::OnWindowPosChanged(window_pos); } |