OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include "views/controls/native_control_gtk.h" | 8 #include "views/controls/native_control_gtk.h" |
9 #elif defined(OS_WIN) | 9 #elif defined(OS_WIN) |
10 #include "views/controls/native_control_win.h" | 10 #include "views/controls/native_control_win.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(NativeSeparatorGtk); | 51 DISALLOW_COPY_AND_ASSIGN(NativeSeparatorGtk); |
52 }; | 52 }; |
53 #endif | 53 #endif |
54 | 54 |
55 // static | 55 // static |
56 const char Separator::kViewClassName[] = "views/Separator"; | 56 const char Separator::kViewClassName[] = "views/Separator"; |
57 | 57 |
58 const int kSeparatorSize = 2; | 58 const int kSeparatorSize = 2; |
59 | 59 |
60 Separator::Separator() { | 60 Separator::Separator() : native_wrapper_(NULL) { |
61 SetFocusable(false); | 61 SetFocusable(false); |
62 } | 62 } |
63 | 63 |
64 Separator::~Separator() { | 64 Separator::~Separator() { |
65 } | 65 } |
66 | 66 |
67 //////////////////////////////////////////////////////////////////////////////// | 67 //////////////////////////////////////////////////////////////////////////////// |
68 // Separator, View overrides: | 68 // Separator, View overrides: |
69 | 69 |
70 gfx::Size Separator::GetPreferredSize() { | 70 gfx::Size Separator::GetPreferredSize() { |
(...skipping 24 matching lines...) Expand all Loading... |
95 | 95 |
96 void Separator::CreateNativeWrapper() { | 96 void Separator::CreateNativeWrapper() { |
97 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
98 native_wrapper_ = new NativeSeparatorWin(this); | 98 native_wrapper_ = new NativeSeparatorWin(this); |
99 #elif defined(OS_LINUX) | 99 #elif defined(OS_LINUX) |
100 native_wrapper_ = new NativeSeparatorGtk(this); | 100 native_wrapper_ = new NativeSeparatorGtk(this); |
101 #endif | 101 #endif |
102 } | 102 } |
103 | 103 |
104 } // namespace views | 104 } // namespace views |
OLD | NEW |