OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/views/window/non_client_view.h" | 5 #include "chrome/views/window/non_client_view.h" |
6 | 6 |
7 #include "chrome/common/win_util.h" | 7 #include "chrome/common/win_util.h" |
8 #include "chrome/views/widget/root_view.h" | 8 #include "chrome/views/widget/root_view.h" |
9 #include "chrome/views/widget/widget.h" | 9 #include "chrome/views/widget/widget.h" |
10 #include "chrome/views/window/window.h" | 10 #include "chrome/views/window/window.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 return View::GetViewForPoint(point, can_create_floating); | 185 return View::GetViewForPoint(point, can_create_floating); |
186 } | 186 } |
187 | 187 |
188 //////////////////////////////////////////////////////////////////////////////// | 188 //////////////////////////////////////////////////////////////////////////////// |
189 // NonClientFrameView, View overrides: | 189 // NonClientFrameView, View overrides: |
190 | 190 |
191 bool NonClientFrameView::HitTest(const gfx::Point& l) const { | 191 bool NonClientFrameView::HitTest(const gfx::Point& l) const { |
192 // For the default case, we assume the non-client frame view never overlaps | 192 // For the default case, we assume the non-client frame view never overlaps |
193 // the client view. | 193 // the client view. |
194 return !GetWidget()->AsWindow()->GetClientView()->bounds().Contains(l); | 194 return !GetWidget()->GetWindow()->GetClientView()->bounds().Contains(l); |
195 } | 195 } |
196 | 196 |
197 void NonClientFrameView::DidChangeBounds(const gfx::Rect& previous, | 197 void NonClientFrameView::DidChangeBounds(const gfx::Rect& previous, |
198 const gfx::Rect& current) { | 198 const gfx::Rect& current) { |
199 // Overridden to do nothing. The NonClientView manually calls Layout on the | 199 // Overridden to do nothing. The NonClientView manually calls Layout on the |
200 // FrameView when it is itself laid out, see comment in NonClientView::Layout. | 200 // FrameView when it is itself laid out, see comment in NonClientView::Layout. |
201 } | 201 } |
202 | 202 |
203 //////////////////////////////////////////////////////////////////////////////// | 203 //////////////////////////////////////////////////////////////////////////////// |
204 // NonClientFrameView, protected: | 204 // NonClientFrameView, protected: |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } else { | 246 } else { |
247 return HTNOWHERE; | 247 return HTNOWHERE; |
248 } | 248 } |
249 | 249 |
250 // If the window can't be resized, there are no resize boundaries, just | 250 // If the window can't be resized, there are no resize boundaries, just |
251 // window borders. | 251 // window borders. |
252 return can_resize ? component : HTBORDER; | 252 return can_resize ? component : HTBORDER; |
253 } | 253 } |
254 | 254 |
255 } // namespace views | 255 } // namespace views |
OLD | NEW |