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

Side by Side Diff: ui/views/examples/table_example.cc

Issue 9582025: Fix crash when closing table example. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « no previous file | 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) 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/examples/table_example.h" 5 #include "ui/views/examples/table_example.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "third_party/skia/include/core/SkCanvas.h" 11 #include "third_party/skia/include/core/SkCanvas.h"
12 #include "ui/views/controls/button/checkbox.h" 12 #include "ui/views/controls/button/checkbox.h"
13 #include "ui/views/layout/grid_layout.h" 13 #include "ui/views/layout/grid_layout.h"
14 14
15 namespace views { 15 namespace views {
16 namespace examples { 16 namespace examples {
17 17
18 TableExample::TableExample() : ExampleBase("Table") { 18 TableExample::TableExample() : ExampleBase("Table") , table_(NULL) {
19 } 19 }
20 20
21 TableExample::~TableExample() { 21 TableExample::~TableExample() {
22 // Delete the view before the model. 22 // Delete the view before the model.
23 delete table_; 23 delete table_;
24 table_ = NULL; 24 table_ = NULL;
25 } 25 }
26 26
27 void TableExample::CreateExampleView(View* container) { 27 void TableExample::CreateExampleView(View* container) {
28 #if defined(OS_WIN) && !defined(USE_AURA) 28 #if defined(OS_WIN) && !defined(USE_AURA)
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } else if (sender == column4_visible_checkbox_) { 151 } else if (sender == column4_visible_checkbox_) {
152 index = 3; 152 index = 3;
153 show = column4_visible_checkbox_->checked(); 153 show = column4_visible_checkbox_->checked();
154 } 154 }
155 table_->SetColumnVisibility(index, show); 155 table_->SetColumnVisibility(index, show);
156 #endif 156 #endif
157 } 157 }
158 158
159 } // namespace examples 159 } // namespace examples
160 } // namespace views 160 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698