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

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

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 #include <X11/Xatom.h> 8 #include <X11/Xatom.h>
9 #include <X11/Xutil.h> 9 #include <X11/Xutil.h>
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 void DesktopRootWindowHostX11::Close() { 363 void DesktopRootWindowHostX11::Close() {
364 // TODO(erg): Might need to do additional hiding tasks here. 364 // TODO(erg): Might need to do additional hiding tasks here.
365 365
366 if (!close_widget_factory_.HasWeakPtrs()) { 366 if (!close_widget_factory_.HasWeakPtrs()) {
367 // And we delay the close so that if we are called from an ATL callback, 367 // And we delay the close so that if we are called from an ATL callback,
368 // we don't destroy the window before the callback returned (as the caller 368 // we don't destroy the window before the callback returned (as the caller
369 // may delete ourselves on destroy and the ATL callback would still 369 // may delete ourselves on destroy and the ATL callback would still
370 // dereference us when the callback returns). 370 // dereference us when the callback returns).
371 MessageLoop::current()->PostTask( 371 base::MessageLoop::current()->PostTask(
372 FROM_HERE, 372 FROM_HERE,
373 base::Bind(&DesktopRootWindowHostX11::CloseNow, 373 base::Bind(&DesktopRootWindowHostX11::CloseNow,
374 close_widget_factory_.GetWeakPtr())); 374 close_widget_factory_.GetWeakPtr()));
375 } 375 }
376 } 376 }
377 377
378 void DesktopRootWindowHostX11::CloseNow() { 378 void DesktopRootWindowHostX11::CloseNow() {
379 if (xwindow_ == None) 379 if (xwindow_ == None)
380 return; 380 return;
381 381
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 DesktopRootWindowHost* DesktopRootWindowHost::Create( 1206 DesktopRootWindowHost* DesktopRootWindowHost::Create(
1207 internal::NativeWidgetDelegate* native_widget_delegate, 1207 internal::NativeWidgetDelegate* native_widget_delegate,
1208 DesktopNativeWidgetAura* desktop_native_widget_aura, 1208 DesktopNativeWidgetAura* desktop_native_widget_aura,
1209 const gfx::Rect& initial_bounds) { 1209 const gfx::Rect& initial_bounds) {
1210 return new DesktopRootWindowHostX11(native_widget_delegate, 1210 return new DesktopRootWindowHostX11(native_widget_delegate,
1211 desktop_native_widget_aura, 1211 desktop_native_widget_aura,
1212 initial_bounds); 1212 initial_bounds);
1213 } 1213 }
1214 1214
1215 } // namespace views 1215 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.h ('k') | ui/views/widget/desktop_aura/x11_desktop_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698