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

Side by Side Diff: views/widget/widget.cc

Issue 7313027: Fix crashes in EnterpriseEnrollmentScreenTest.TestCancel. This is independent of any tfarina-indu... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | « views/widget/native_widget_win.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) 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/widget/widget.h" 5 #include "views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/l10n/l10n_font_util.h" 10 #include "ui/base/l10n/l10n_font_util.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
148 Widget::~Widget() { 148 Widget::~Widget() {
149 while (!event_stack_.empty()) { 149 while (!event_stack_.empty()) {
150 event_stack_.top()->reset(); 150 event_stack_.top()->reset();
151 event_stack_.pop(); 151 event_stack_.pop();
152 } 152 }
153 153
154 DestroyRootView(); 154 DestroyRootView();
155 155
156 if (ownership_ == InitParams::WIDGET_OWNS_NATIVE_WIDGET) { 156 if (ownership_ == InitParams::WIDGET_OWNS_NATIVE_WIDGET)
157 CloseNow();
158 delete native_widget_; 157 delete native_widget_;
159 }
160 } 158 }
161 159
162 // static 160 // static
163 Widget* Widget::CreateWindow(WidgetDelegate* delegate) { 161 Widget* Widget::CreateWindow(WidgetDelegate* delegate) {
164 return CreateWindowWithParentAndBounds(delegate, NULL, gfx::Rect()); 162 return CreateWindowWithParentAndBounds(delegate, NULL, gfx::Rect());
165 } 163 }
166 164
167 // static 165 // static
168 Widget* Widget::CreateWindowWithParent(WidgetDelegate* delegate, 166 Widget* Widget::CreateWindowWithParent(WidgetDelegate* delegate,
169 gfx::NativeWindow parent) { 167 gfx::NativeWindow parent) {
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 1010
1013 //////////////////////////////////////////////////////////////////////////////// 1011 ////////////////////////////////////////////////////////////////////////////////
1014 // internal::NativeWidgetPrivate, NativeWidget implementation: 1012 // internal::NativeWidgetPrivate, NativeWidget implementation:
1015 1013
1016 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1014 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1017 return this; 1015 return this;
1018 } 1016 }
1019 1017
1020 } // namespace internal 1018 } // namespace internal
1021 } // namespace views 1019 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698