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

Side by Side Diff: trunk/src/content/browser/power_save_blocker_x11.cc

Issue 16897005: Revert 206507 "Move message_pump to base/message_loop." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 "content/browser/power_save_blocker_impl.h" 5 #include "content/browser/power_save_blocker_impl.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/extensions/dpms.h> 8 #include <X11/extensions/dpms.h>
9 // Xlib #defines Status, but we can't have that for some of our headers. 9 // Xlib #defines Status, but we can't have that for some of our headers.
10 #ifdef Status 10 #ifdef Status
11 #undef Status 11 #undef Status
12 #endif 12 #endif
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/callback.h" 16 #include "base/callback.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/environment.h" 18 #include "base/environment.h"
19 #include "base/files/file_path.h" 19 #include "base/files/file_path.h"
20 #include "base/logging.h" 20 #include "base/logging.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/scoped_ptr.h" 22 #include "base/memory/scoped_ptr.h"
23 #include "base/memory/singleton.h" 23 #include "base/memory/singleton.h"
24 #include "base/message_loop/message_loop_proxy.h" 24 #include "base/message_loop/message_loop_proxy.h"
25 #if defined(TOOLKIT_GTK)
26 #include "base/message_pump_gtk.h"
27 #else
28 #include "base/message_pump_aurax11.h"
29 #endif
25 #include "base/nix/xdg_util.h" 30 #include "base/nix/xdg_util.h"
26 #include "base/synchronization/lock.h" 31 #include "base/synchronization/lock.h"
27 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
28 #include "dbus/bus.h" 33 #include "dbus/bus.h"
29 #include "dbus/message.h" 34 #include "dbus/message.h"
30 #include "dbus/object_path.h" 35 #include "dbus/object_path.h"
31 #include "dbus/object_proxy.h" 36 #include "dbus/object_proxy.h"
32 37
33 #if defined(TOOLKIT_GTK)
34 #include "base/message_loop/message_pump_gtk.h"
35 #else
36 #include "base/message_loop/message_pump_aurax11.h"
37 #endif
38
39 namespace { 38 namespace {
40 39
41 enum DBusAPI { 40 enum DBusAPI {
42 NO_API, // Disable. No supported API available. 41 NO_API, // Disable. No supported API available.
43 GNOME_API, // Use the GNOME API. (Supports more features.) 42 GNOME_API, // Use the GNOME API. (Supports more features.)
44 FREEDESKTOP_API, // Use the FreeDesktop API, for KDE4 and XFCE. 43 FREEDESKTOP_API, // Use the FreeDesktop API, for KDE4 and XFCE.
45 }; 44 };
46 45
47 // Inhibit flags defined in the org.gnome.SessionManager interface. 46 // Inhibit flags defined in the org.gnome.SessionManager interface.
48 // Can be OR'd together and passed as argument to the Inhibit() method 47 // Can be OR'd together and passed as argument to the Inhibit() method
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 PowerSaveBlockerType type, const std::string& reason) 333 PowerSaveBlockerType type, const std::string& reason)
335 : delegate_(new Delegate(type, reason)) { 334 : delegate_(new Delegate(type, reason)) {
336 delegate_->Init(); 335 delegate_->Init();
337 } 336 }
338 337
339 PowerSaveBlockerImpl::~PowerSaveBlockerImpl() { 338 PowerSaveBlockerImpl::~PowerSaveBlockerImpl() {
340 delegate_->CleanUp(); 339 delegate_->CleanUp();
341 } 340 }
342 341
343 } // namespace content 342 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/chromeos/display/real_output_configurator_delegate.cc ('k') | trunk/src/content/browser/udev_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698