summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/power_manager_client.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-03 02:35:54 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-03 02:35:54 +0000
commit5ab25b4d00615fe7146247ffbbfa7ca130ecad49 (patch)
tree3599af1fe5ec4ce591e0b4a287a08aca5a0f1b58 /chromeos/dbus/power_manager_client.cc
parent959a8bfe7d9f39adf85dc1034c028cbea815e884 (diff)
downloadchromium_src-5ab25b4d00615fe7146247ffbbfa7ca130ecad49.zip
chromium_src-5ab25b4d00615fe7146247ffbbfa7ca130ecad49.tar.gz
chromium_src-5ab25b4d00615fe7146247ffbbfa7ca130ecad49.tar.bz2
chromeos: Use native D-Bus args for HandleVideoActivity.
This updates HandleVideoActivity D-Bus method calls to the power manager to send a single "is_fullscreen" boolean argument instead of the heavier-weight protocol buffer that was used before. Doing so shortens some code and allows the removal of an old protobuf build target. BUG=none Review URL: https://chromiumcodereview.appspot.com/18385003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/power_manager_client.cc')
-rw-r--r--chromeos/dbus/power_manager_client.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index 1031381..d2fd3f8 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -22,7 +22,6 @@
#include "chromeos/dbus/power_manager/policy.pb.h"
#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
#include "chromeos/dbus/power_manager/suspend.pb.h"
-#include "chromeos/dbus/video_activity_update.pb.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
@@ -251,23 +250,13 @@ class PowerManagerClientImpl : public PowerManagerClient {
SimpleMethodCallToPowerManager(power_manager::kHandleUserActivityMethod);
}
- virtual void NotifyVideoActivity(
- const base::TimeTicks& last_activity_time,
- bool is_fullscreen) OVERRIDE {
+ virtual void NotifyVideoActivity(bool is_fullscreen) OVERRIDE {
dbus::MethodCall method_call(
power_manager::kPowerManagerInterface,
power_manager::kHandleVideoActivityMethod);
dbus::MessageWriter writer(&method_call);
+ writer.AppendBool(is_fullscreen);
- VideoActivityUpdate protobuf;
- protobuf.set_last_activity_time(last_activity_time.ToInternalValue());
- protobuf.set_is_fullscreen(is_fullscreen);
-
- if (!writer.AppendProtoAsArrayOfBytes(protobuf)) {
- LOG(ERROR) << "Error calling "
- << power_manager::kHandleVideoActivityMethod;
- return;
- }
power_manager_proxy_->CallMethod(
&method_call,
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
@@ -742,9 +731,7 @@ class PowerManagerClientStubImpl : public PowerManagerClient {
}
virtual void NotifyUserActivity() OVERRIDE {}
- virtual void NotifyVideoActivity(
- const base::TimeTicks& last_activity_time,
- bool is_fullscreen) OVERRIDE {}
+ virtual void NotifyVideoActivity(bool is_fullscreen) OVERRIDE {}
virtual void SetPolicy(
const power_manager::PowerManagementPolicy& policy) OVERRIDE {}
virtual void SetIsProjecting(bool is_projecting) OVERRIDE {}