| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/controls/separator.h" | 5 #include "views/controls/separator.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/base/accessibility/accessible_view_state.h" | 8 #include "ui/base/accessibility/accessible_view_state.h" |
| 9 #include "views/widget/widget.h" | 9 #include "views/widget/widget.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 DISALLOW_COPY_AND_ASSIGN(NativeSeparatorGtk); | 56 DISALLOW_COPY_AND_ASSIGN(NativeSeparatorGtk); |
| 57 }; | 57 }; |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 // static | 60 // static |
| 61 const char Separator::kViewClassName[] = "views/Separator"; | 61 const char Separator::kViewClassName[] = "views/Separator"; |
| 62 | 62 |
| 63 const int kSeparatorSize = 2; | 63 const int kSeparatorSize = 2; |
| 64 | 64 |
| 65 Separator::Separator() : native_wrapper_(NULL) { | 65 Separator::Separator() : native_wrapper_(NULL) { |
| 66 SetFocusable(false); | 66 set_focusable(false); |
| 67 } | 67 } |
| 68 | 68 |
| 69 Separator::~Separator() { | 69 Separator::~Separator() { |
| 70 } | 70 } |
| 71 | 71 |
| 72 //////////////////////////////////////////////////////////////////////////////// | 72 //////////////////////////////////////////////////////////////////////////////// |
| 73 // Separator, View overrides: | 73 // Separator, View overrides: |
| 74 | 74 |
| 75 gfx::Size Separator::GetPreferredSize() { | 75 gfx::Size Separator::GetPreferredSize() { |
| 76 return gfx::Size(width(), kSeparatorSize); | 76 return gfx::Size(width(), kSeparatorSize); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 105 | 105 |
| 106 void Separator::CreateNativeWrapper() { | 106 void Separator::CreateNativeWrapper() { |
| 107 #if defined(OS_WIN) | 107 #if defined(OS_WIN) |
| 108 native_wrapper_ = new NativeSeparatorWin(this); | 108 native_wrapper_ = new NativeSeparatorWin(this); |
| 109 #elif defined(OS_LINUX) | 109 #elif defined(OS_LINUX) |
| 110 native_wrapper_ = new NativeSeparatorGtk(this); | 110 native_wrapper_ = new NativeSeparatorGtk(this); |
| 111 #endif | 111 #endif |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace views | 114 } // namespace views |
| OLD | NEW |