| 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 "base/logging.h" | 5 #include "base/logging.h" | 
| 6 #include "views/window/client_view.h" | 6 #include "views/window/client_view.h" | 
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) | 
| 8 #include "views/window/hit_test.h" | 8 #include "views/window/hit_test.h" | 
| 9 #endif | 9 #endif | 
| 10 #include "views/window/window.h" | 10 #include "views/window/window.h" | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 45   if (contents_view_) | 45   if (contents_view_) | 
| 46     contents_view_->SetBounds(0, 0, width(), height()); | 46     contents_view_->SetBounds(0, 0, width(), height()); | 
| 47 } | 47 } | 
| 48 | 48 | 
| 49 void ClientView::ViewHierarchyChanged(bool is_add, View* parent, View* child) { | 49 void ClientView::ViewHierarchyChanged(bool is_add, View* parent, View* child) { | 
| 50   if (is_add && child == this) { | 50   if (is_add && child == this) { | 
| 51     DCHECK(GetWidget()); | 51     DCHECK(GetWidget()); | 
| 52     DCHECK(contents_view_); // |contents_view_| must be valid now! | 52     DCHECK(contents_view_); // |contents_view_| must be valid now! | 
| 53     // Insert |contents_view_| at index 0 so it is first in the focus chain. | 53     // Insert |contents_view_| at index 0 so it is first in the focus chain. | 
| 54     // (the OK/Cancel buttons are inserted before contents_view_) | 54     // (the OK/Cancel buttons are inserted before contents_view_) | 
| 55     AddChildView(0, contents_view_); | 55     AddChildViewAt(contents_view_, 0); | 
| 56   } | 56   } | 
| 57 } | 57 } | 
| 58 | 58 | 
| 59 void ClientView::OnBoundsChanged() { | 59 void ClientView::OnBoundsChanged() { | 
| 60   // Overridden to do nothing. The NonClientView manually calls Layout on the | 60   // Overridden to do nothing. The NonClientView manually calls Layout on the | 
| 61   // ClientView when it is itself laid out, see comment in | 61   // ClientView when it is itself laid out, see comment in | 
| 62   // NonClientView::Layout. | 62   // NonClientView::Layout. | 
| 63 } | 63 } | 
| 64 | 64 | 
| 65 AccessibilityTypes::Role ClientView::GetAccessibleRole() { | 65 AccessibilityTypes::Role ClientView::GetAccessibleRole() { | 
| 66   return AccessibilityTypes::ROLE_CLIENT; | 66   return AccessibilityTypes::ROLE_CLIENT; | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 }  // namespace views | 69 }  // namespace views | 
| OLD | NEW | 
|---|