Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: views/controls/separator.cc

Issue 118136: Properly initialize the native wrapper to NULL to avoid a crash. Also re-enab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/mini_installer_test/test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/test/mini_installer_test/test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698