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

Unified Diff: device/power_save_blocker/power_save_blocker_x11.cc

Issue 2075153002: Reland of 'Move content/browser/power_save_blocker to //device/power_save_blocker' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing libs for component mac Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/power_save_blocker/power_save_blocker_win.cc ('k') | device/test/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/power_save_blocker/power_save_blocker_x11.cc
diff --git a/content/browser/power_save_blocker_x11.cc b/device/power_save_blocker/power_save_blocker_x11.cc
similarity index 98%
rename from content/browser/power_save_blocker_x11.cc
rename to device/power_save_blocker/power_save_blocker_x11.cc
index a177e392ce1466f2469fe0f76908cd1c09959d7d..ed66813dae8ee05c6ebf2585ca89dbc028a00cb1 100644
--- a/content/browser/power_save_blocker_x11.cc
+++ b/device/power_save_blocker/power_save_blocker_x11.cc
@@ -9,7 +9,7 @@
#include <memory>
-#include "content/browser/power_save_blocker_impl.h"
+#include "device/power_save_blocker/power_save_blocker_impl.h"
// Xlib #defines Status, but we can't have that for some of our headers.
#ifdef Status
#undef Status
@@ -45,9 +45,9 @@ enum DBusAPI {
// Can be OR'd together and passed as argument to the Inhibit() method
// to specify which power management features we want to suspend.
enum GnomeAPIInhibitFlags {
- INHIBIT_LOGOUT = 1,
- INHIBIT_SWITCH_USER = 2,
- INHIBIT_SUSPEND_SESSION = 4,
+ INHIBIT_LOGOUT = 1,
+ INHIBIT_SWITCH_USER = 2,
+ INHIBIT_SUSPEND_SESSION = 4,
INHIBIT_MARK_SESSION_IDLE = 8
};
@@ -68,7 +68,7 @@ const char kFreeDesktopAPIScreenObjectPath[] = "/org/freedesktop/ScreenSaver";
} // namespace
-namespace content {
+namespace device {
class PowerSaveBlockerImpl::Delegate
: public base::RefCountedThreadSafe<PowerSaveBlockerImpl::Delegate> {
@@ -256,8 +256,7 @@ void PowerSaveBlockerImpl::Delegate::ApplyBlock() {
return;
case GNOME_API:
object_proxy = bus_->GetObjectProxy(
- kGnomeAPIServiceName,
- dbus::ObjectPath(kGnomeAPIObjectPath));
+ kGnomeAPIServiceName, dbus::ObjectPath(kGnomeAPIObjectPath));
method_call.reset(
new dbus::MethodCall(kGnomeAPIInterfaceName, "Inhibit"));
message_writer.reset(new dbus::MessageWriter(method_call.get()));
@@ -366,8 +365,7 @@ void PowerSaveBlockerImpl::Delegate::RemoveBlock() {
return;
case GNOME_API:
object_proxy = bus_->GetObjectProxy(
- kGnomeAPIServiceName,
- dbus::ObjectPath(kGnomeAPIObjectPath));
+ kGnomeAPIServiceName, dbus::ObjectPath(kGnomeAPIObjectPath));
method_call.reset(
new dbus::MethodCall(kGnomeAPIInterfaceName, "Uninhibit"));
break;
@@ -505,4 +503,4 @@ PowerSaveBlockerImpl::~PowerSaveBlockerImpl() {
freedesktop_suspend_delegate_->CleanUp();
}
-} // namespace content
+} // namespace device
« no previous file with comments | « device/power_save_blocker/power_save_blocker_win.cc ('k') | device/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698