| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/window/non_client_view.h" | 5 #include "views/window/non_client_view.h" |
| 6 | 6 |
| 7 #include "views/widget/root_view.h" | 7 #include "views/widget/root_view.h" |
| 8 #include "views/widget/widget.h" | 8 #include "views/widget/widget.h" |
| 9 #include "views/window/window.h" | 9 #include "views/window/window.h" |
| 10 | 10 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 return View::GetEventHandlerForPoint(point); | 174 return View::GetEventHandlerForPoint(point); |
| 175 } | 175 } |
| 176 | 176 |
| 177 AccessibilityTypes::Role NonClientView::GetAccessibleRole() { | 177 AccessibilityTypes::Role NonClientView::GetAccessibleRole() { |
| 178 return AccessibilityTypes::ROLE_WINDOW; | 178 return AccessibilityTypes::ROLE_WINDOW; |
| 179 } | 179 } |
| 180 | 180 |
| 181 //////////////////////////////////////////////////////////////////////////////// | 181 //////////////////////////////////////////////////////////////////////////////// |
| 182 // NonClientFrameView, View overrides: | 182 // NonClientFrameView, View overrides: |
| 183 | 183 |
| 184 bool NonClientFrameView::AlwaysUseCustomFrame() const { |
| 185 return false; |
| 186 } |
| 187 |
| 188 bool NonClientFrameView::AlwaysUseNativeFrame() const { |
| 189 return false; |
| 190 } |
| 191 |
| 184 bool NonClientFrameView::HitTest(const gfx::Point& l) const { | 192 bool NonClientFrameView::HitTest(const gfx::Point& l) const { |
| 185 // For the default case, we assume the non-client frame view never overlaps | 193 // For the default case, we assume the non-client frame view never overlaps |
| 186 // the client view. | 194 // the client view. |
| 187 return !GetWindow()->GetClientView()->bounds().Contains(l); | 195 return !GetWindow()->GetClientView()->bounds().Contains(l); |
| 188 } | 196 } |
| 189 | 197 |
| 190 void NonClientFrameView::OnBoundsChanged() { | 198 void NonClientFrameView::OnBoundsChanged() { |
| 191 // Overridden to do nothing. The NonClientView manually calls Layout on the | 199 // Overridden to do nothing. The NonClientView manually calls Layout on the |
| 192 // 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. |
| 193 } | 201 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 | 254 |
| 247 bool NonClientFrameView::ShouldPaintAsActive() const { | 255 bool NonClientFrameView::ShouldPaintAsActive() const { |
| 248 return GetWindow()->IsActive() || paint_as_active_; | 256 return GetWindow()->IsActive() || paint_as_active_; |
| 249 } | 257 } |
| 250 | 258 |
| 251 AccessibilityTypes::Role NonClientFrameView::GetAccessibleRole() { | 259 AccessibilityTypes::Role NonClientFrameView::GetAccessibleRole() { |
| 252 return AccessibilityTypes::ROLE_WINDOW; | 260 return AccessibilityTypes::ROLE_WINDOW; |
| 253 } | 261 } |
| 254 | 262 |
| 255 } // namespace views | 263 } // namespace views |
| OLD | NEW |