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

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

Issue 11829040: Fix the content_browsertests everywhere maybe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 7 years, 11 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 | « ui/views/widget/native_widget_aura.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) 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/widget/widget.h" 5 #include "ui/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/events/event.h" 10 #include "ui/base/events/event.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 delete native_widget_; 214 delete native_widget_;
215 } else { 215 } else {
216 DCHECK(native_widget_destroyed_) 216 DCHECK(native_widget_destroyed_)
217 << "Destroying a widget with a live native widget. " 217 << "Destroying a widget with a live native widget. "
218 << "Widget probably should use WIDGET_OWNS_NATIVE_WIDGET ownership."; 218 << "Widget probably should use WIDGET_OWNS_NATIVE_WIDGET ownership.";
219 } 219 }
220 } 220 }
221 221
222 // static 222 // static
223 Widget* Widget::CreateWindow(WidgetDelegate* delegate) { 223 Widget* Widget::CreateWindow(WidgetDelegate* delegate) {
224 return CreateWindowWithBounds(delegate, gfx::Rect());
225 }
226
227 // static
228 Widget* Widget::CreateWindowWithBounds(WidgetDelegate* delegate,
229 const gfx::Rect& bounds) {
224 Widget* widget = new Widget; 230 Widget* widget = new Widget;
225 Widget::InitParams params; 231 Widget::InitParams params;
232 params.bounds = bounds;
226 params.delegate = delegate; 233 params.delegate = delegate;
227 params.top_level = true; 234 params.top_level = true;
228 widget->Init(params); 235 widget->Init(params);
229 return widget; 236 return widget;
230 } 237 }
231 238
232 // static 239 // static
233 Widget* Widget::CreateWindowWithBounds(WidgetDelegate* delegate,
234 const gfx::Rect& bounds) {
235 return CreateWindowWithParentAndBounds(delegate, NULL, bounds);
236 }
237
238 // static
239 Widget* Widget::CreateWindowWithParent(WidgetDelegate* delegate, 240 Widget* Widget::CreateWindowWithParent(WidgetDelegate* delegate,
240 gfx::NativeWindow parent) { 241 gfx::NativeWindow parent) {
241 return CreateWindowWithParentAndBounds(delegate, parent, gfx::Rect()); 242 return CreateWindowWithParentAndBounds(delegate, parent, gfx::Rect());
242 } 243 }
243 244
244 // static 245 // static
245 Widget* Widget::CreateWindowWithParentAndBounds(WidgetDelegate* delegate, 246 Widget* Widget::CreateWindowWithParentAndBounds(WidgetDelegate* delegate,
246 gfx::NativeWindow parent, 247 gfx::NativeWindow parent,
247 const gfx::Rect& bounds) { 248 const gfx::Rect& bounds) {
248 Widget* widget = new Widget; 249 Widget* widget = new Widget;
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 1406
1406 //////////////////////////////////////////////////////////////////////////////// 1407 ////////////////////////////////////////////////////////////////////////////////
1407 // internal::NativeWidgetPrivate, NativeWidget implementation: 1408 // internal::NativeWidgetPrivate, NativeWidget implementation:
1408 1409
1409 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1410 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1410 return this; 1411 return this;
1411 } 1412 }
1412 1413
1413 } // namespace internal 1414 } // namespace internal
1414 } // namespace views 1415 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698