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: chromeos/dbus/power_manager_client.cc

Issue 2020553003: Hook up TABLET_MODE switch to maximize_mode_controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hook up TABLET_MODE switch to maximize_mode_controller 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 unified diff | Download patch
« no previous file with comments | « chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/dbus/power_manager_client.h" 5 #include "chromeos/dbus/power_manager_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 break; 626 break;
627 } 627 }
628 case power_manager::InputEvent_Type_LID_OPEN: 628 case power_manager::InputEvent_Type_LID_OPEN:
629 case power_manager::InputEvent_Type_LID_CLOSED: { 629 case power_manager::InputEvent_Type_LID_CLOSED: {
630 bool open = 630 bool open =
631 (proto.type() == power_manager::InputEvent_Type_LID_OPEN); 631 (proto.type() == power_manager::InputEvent_Type_LID_OPEN);
632 FOR_EACH_OBSERVER(PowerManagerClient::Observer, observers_, 632 FOR_EACH_OBSERVER(PowerManagerClient::Observer, observers_,
633 LidEventReceived(open, timestamp)); 633 LidEventReceived(open, timestamp));
634 break; 634 break;
635 } 635 }
636 case power_manager::InputEvent_Type_TABLET_MODE_ON:
637 case power_manager::InputEvent_Type_TABLET_MODE_OFF: {
638 bool on =
639 (proto.type() == power_manager::InputEvent_Type_TABLET_MODE_ON);
640 FOR_EACH_OBSERVER(PowerManagerClient::Observer, observers_,
641 TabletModeEventReceived(on, timestamp));
642 break;
643 }
636 } 644 }
637 } 645 }
638 646
639 void RegisterSuspendDelayImpl( 647 void RegisterSuspendDelayImpl(
640 const std::string& method_name, 648 const std::string& method_name,
641 const power_manager::RegisterSuspendDelayRequest& protobuf_request, 649 const power_manager::RegisterSuspendDelayRequest& protobuf_request,
642 dbus::ObjectProxy::ResponseCallback callback) { 650 dbus::ObjectProxy::ResponseCallback callback) {
643 dbus::MethodCall method_call( 651 dbus::MethodCall method_call(
644 power_manager::kPowerManagerInterface, method_name); 652 power_manager::kPowerManagerInterface, method_name);
645 dbus::MessageWriter writer(&method_call); 653 dbus::MessageWriter writer(&method_call);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 // static 800 // static
793 PowerManagerClient* PowerManagerClient::Create( 801 PowerManagerClient* PowerManagerClient::Create(
794 DBusClientImplementationType type) { 802 DBusClientImplementationType type) {
795 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 803 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
796 return new PowerManagerClientImpl(); 804 return new PowerManagerClientImpl();
797 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 805 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
798 return new FakePowerManagerClient(); 806 return new FakePowerManagerClient();
799 } 807 }
800 808
801 } // namespace chromeos 809 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/power_manager_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698