OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/window/non_client_view.h" | 5 #include "ui/views/window/non_client_view.h" |
6 | 6 |
7 #include "ui/base/accessibility/accessible_view_state.h" | 7 #include "ui/base/accessibility/accessible_view_state.h" |
8 #include "ui/base/hit_test.h" | 8 #include "ui/base/hit_test.h" |
9 #include "ui/views/widget/root_view.h" | 9 #include "ui/views/widget/root_view.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // trigger a repaint. We override OnBoundsChanged() for the NonClientFrameView | 126 // trigger a repaint. We override OnBoundsChanged() for the NonClientFrameView |
127 // to do nothing so that SetBounds above doesn't cause Layout to be called | 127 // to do nothing so that SetBounds above doesn't cause Layout to be called |
128 // twice. | 128 // twice. |
129 frame_view_->Layout(); | 129 frame_view_->Layout(); |
130 } | 130 } |
131 | 131 |
132 void NonClientView::SetAccessibleName(const string16& name) { | 132 void NonClientView::SetAccessibleName(const string16& name) { |
133 accessible_name_ = name; | 133 accessible_name_ = name; |
134 } | 134 } |
135 | 135 |
| 136 bool NonClientView::IsFrameViewDocked() const { |
| 137 return frame_view_->IsDocked(); |
| 138 } |
| 139 |
136 //////////////////////////////////////////////////////////////////////////////// | 140 //////////////////////////////////////////////////////////////////////////////// |
137 // NonClientView, View overrides: | 141 // NonClientView, View overrides: |
138 | 142 |
139 gfx::Size NonClientView::GetPreferredSize() { | 143 gfx::Size NonClientView::GetPreferredSize() { |
140 // TODO(pkasting): This should probably be made to look similar to | 144 // TODO(pkasting): This should probably be made to look similar to |
141 // GetMinimumSize() below. This will require implementing GetPreferredSize() | 145 // GetMinimumSize() below. This will require implementing GetPreferredSize() |
142 // better in the various frame views. | 146 // better in the various frame views. |
143 gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); | 147 gfx::Rect client_bounds(gfx::Point(), client_view_->GetPreferredSize()); |
144 return GetWindowBoundsForClientBounds(client_bounds).size(); | 148 return GetWindowBoundsForClientBounds(client_bounds).size(); |
145 } | 149 } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 const char* NonClientFrameView::GetClassName() const { | 317 const char* NonClientFrameView::GetClassName() const { |
314 return kViewClassName; | 318 return kViewClassName; |
315 } | 319 } |
316 | 320 |
317 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { | 321 void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) { |
318 // Overridden to do nothing. The NonClientView manually calls Layout on the | 322 // Overridden to do nothing. The NonClientView manually calls Layout on the |
319 // FrameView when it is itself laid out, see comment in NonClientView::Layout. | 323 // FrameView when it is itself laid out, see comment in NonClientView::Layout. |
320 } | 324 } |
321 | 325 |
322 } // namespace views | 326 } // namespace views |
OLD | NEW |