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

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

Issue 589413002: Fix WeakPtrFactory member ordering in ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unwanted header inclusions Created 6 years, 3 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
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/desktop_aura/desktop_native_widget_aura.h" 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "ui/aura/client/aura_constants.h" 9 #include "ui/aura/client/aura_constants.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 int DesktopNativeWidgetAura::cursor_reference_count_ = 0; 247 int DesktopNativeWidgetAura::cursor_reference_count_ = 0;
248 DesktopNativeCursorManager* DesktopNativeWidgetAura::native_cursor_manager_ = 248 DesktopNativeCursorManager* DesktopNativeWidgetAura::native_cursor_manager_ =
249 NULL; 249 NULL;
250 wm::CursorManager* DesktopNativeWidgetAura::cursor_manager_ = NULL; 250 wm::CursorManager* DesktopNativeWidgetAura::cursor_manager_ = NULL;
251 251
252 DesktopNativeWidgetAura::DesktopNativeWidgetAura( 252 DesktopNativeWidgetAura::DesktopNativeWidgetAura(
253 internal::NativeWidgetDelegate* delegate) 253 internal::NativeWidgetDelegate* delegate)
254 : desktop_window_tree_host_(NULL), 254 : desktop_window_tree_host_(NULL),
255 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET), 255 ownership_(Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET),
256 close_widget_factory_(this),
257 content_window_container_(NULL), 256 content_window_container_(NULL),
258 content_window_(new aura::Window(this)), 257 content_window_(new aura::Window(this)),
259 native_widget_delegate_(delegate), 258 native_widget_delegate_(delegate),
260 last_drop_operation_(ui::DragDropTypes::DRAG_NONE), 259 last_drop_operation_(ui::DragDropTypes::DRAG_NONE),
261 restore_focus_on_activate_(false), 260 restore_focus_on_activate_(false),
262 cursor_(gfx::kNullCursor), 261 cursor_(gfx::kNullCursor),
263 widget_type_(Widget::InitParams::TYPE_WINDOW) { 262 widget_type_(Widget::InitParams::TYPE_WINDOW),
263 close_widget_factory_(this) {
264 aura::client::SetFocusChangeObserver(content_window_, this); 264 aura::client::SetFocusChangeObserver(content_window_, this);
265 aura::client::SetActivationChangeObserver(content_window_, this); 265 aura::client::SetActivationChangeObserver(content_window_, this);
266 } 266 }
267 267
268 DesktopNativeWidgetAura::~DesktopNativeWidgetAura() { 268 DesktopNativeWidgetAura::~DesktopNativeWidgetAura() {
269 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) 269 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET)
270 delete native_widget_delegate_; 270 delete native_widget_delegate_;
271 else 271 else
272 CloseNow(); 272 CloseNow();
273 } 273 }
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 if (cursor_reference_count_ == 0) { 1208 if (cursor_reference_count_ == 0) {
1209 // We are the last DesktopNativeWidgetAura instance, and we are responsible 1209 // We are the last DesktopNativeWidgetAura instance, and we are responsible
1210 // for cleaning up |cursor_manager_|. 1210 // for cleaning up |cursor_manager_|.
1211 delete cursor_manager_; 1211 delete cursor_manager_;
1212 native_cursor_manager_ = NULL; 1212 native_cursor_manager_ = NULL;
1213 cursor_manager_ = NULL; 1213 cursor_manager_ = NULL;
1214 } 1214 }
1215 } 1215 }
1216 1216
1217 } // namespace views 1217 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698