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

Unified Diff: chrome/browser/chromeos/dbus/display_power_service_provider.h

Issue 739123002: Move DisplayPowerServiceProvider to chromeos/dbus/services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
Index: chrome/browser/chromeos/dbus/display_power_service_provider.h
diff --git a/chrome/browser/chromeos/dbus/display_power_service_provider.h b/chrome/browser/chromeos/dbus/display_power_service_provider.h
deleted file mode 100644
index f72528419ef5ae82a14879bce87fd5924572de8c..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/dbus/display_power_service_provider.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_DBUS_DISPLAY_POWER_SERVICE_PROVIDER_H_
-#define CHROME_BROWSER_CHROMEOS_DBUS_DISPLAY_POWER_SERVICE_PROVIDER_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "chromeos/dbus/services/cros_dbus_service.h"
-#include "dbus/exported_object.h"
-
-namespace dbus {
-class MethodCall;
-class Response;
-}
-
-namespace chromeos {
-
-// This class exports "SetDisplayPower" and "SetDisplaySoftwareDimming"
-// D-Bus methods that the power manager calls to instruct Chrome to turn
-// various displays on or off or dim them.
-class DisplayPowerServiceProvider
- : public CrosDBusService::ServiceProviderInterface {
- public:
- DisplayPowerServiceProvider();
- virtual ~DisplayPowerServiceProvider();
-
- // CrosDBusService::ServiceProviderInterface overrides:
- virtual void Start(
- scoped_refptr<dbus::ExportedObject> exported_object) override;
-
- private:
- // Called from ExportedObject when a handler is exported as a D-Bus
- // method or failed to be exported.
- void OnExported(const std::string& interface_name,
- const std::string& method_name,
- bool success);
-
- // Called on UI thread in response to D-Bus requests.
- void SetDisplayPower(dbus::MethodCall* method_call,
- dbus::ExportedObject::ResponseSender response_sender);
- void SetDisplaySoftwareDimming(
- dbus::MethodCall* method_call,
- dbus::ExportedObject::ResponseSender response_sender);
-
- // Keep this last so that all weak pointers will be invalidated at the
- // beginning of destruction.
- base::WeakPtrFactory<DisplayPowerServiceProvider> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DisplayPowerServiceProvider);
-};
-
-} // namespace chromeos
-
-#endif // CHROME_BROWSER_CHROMEOS_DBUS_DISPLAY_POWER_SERVICE_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698