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

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

Issue 134103006: linux_aura: Fix cursor memeory leak, which was redding the lsan bot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 6 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
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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "ui/aura/client/activation_change_observer.h" 9 #include "ui/aura/client/activation_change_observer.h"
10 #include "ui/aura/client/activation_delegate.h" 10 #include "ui/aura/client/activation_delegate.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 scoped_ptr<views::corewm::VisibilityController> visibility_controller_; 289 scoped_ptr<views::corewm::VisibilityController> visibility_controller_;
290 290
291 scoped_ptr<views::corewm::WindowModalityController> 291 scoped_ptr<views::corewm::WindowModalityController>
292 window_modality_controller_; 292 window_modality_controller_;
293 293
294 // See comments in OnLostActive(). 294 // See comments in OnLostActive().
295 bool restore_focus_on_activate_; 295 bool restore_focus_on_activate_;
296 296
297 gfx::NativeCursor cursor_; 297 gfx::NativeCursor cursor_;
298 // We must manually reference count the number of users of |cursor_manager_|
299 // because the cursors created by |cursor_manager_| are shared among the
300 // DNWAs. We can't just stuff this in a LazyInstance because we need to
301 // destroy this as the last DNWA happens; we can't put it off until
302 // (potentially) after we tear down the X11 connection because that's a
303 // crash.
304 static int cursor_reference_count_;
298 static views::corewm::CursorManager* cursor_manager_; 305 static views::corewm::CursorManager* cursor_manager_;
299 static views::DesktopNativeCursorManager* native_cursor_manager_; 306 static views::DesktopNativeCursorManager* native_cursor_manager_;
300 307
301 scoped_ptr<corewm::ShadowController> shadow_controller_; 308 scoped_ptr<corewm::ShadowController> shadow_controller_;
302 309
303 // Reorders child windows of |window_| associated with a view based on the 310 // Reorders child windows of |window_| associated with a view based on the
304 // order of the associated views in the widget's view hierarchy. 311 // order of the associated views in the widget's view hierarchy.
305 scoped_ptr<WindowReorderer> window_reorderer_; 312 scoped_ptr<WindowReorderer> window_reorderer_;
306 313
307 // See class documentation for Widget in widget.h for a note about type. 314 // See class documentation for Widget in widget.h for a note about type.
308 Widget::InitParams::Type widget_type_; 315 Widget::InitParams::Type widget_type_;
309 316
310 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); 317 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura);
311 }; 318 };
312 319
313 } // namespace views 320 } // namespace views
314 321
315 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 322 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698