OLD | NEW |
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/session_manager_client.h" | 5 #include "chromeos/dbus/session_manager_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 virtual void EmitLoginPromptReady() OVERRIDE { | 51 virtual void EmitLoginPromptReady() OVERRIDE { |
52 SimpleMethodCallToSessionManager( | 52 SimpleMethodCallToSessionManager( |
53 login_manager::kSessionManagerEmitLoginPromptReady); | 53 login_manager::kSessionManagerEmitLoginPromptReady); |
54 } | 54 } |
55 | 55 |
56 virtual void EmitLoginPromptVisible() OVERRIDE { | 56 virtual void EmitLoginPromptVisible() OVERRIDE { |
57 SimpleMethodCallToSessionManager( | 57 SimpleMethodCallToSessionManager( |
58 login_manager::kSessionManagerEmitLoginPromptVisible); | 58 login_manager::kSessionManagerEmitLoginPromptVisible); |
| 59 FOR_EACH_OBSERVER(Observer, observers_, EmitLoginPromptVisibleCalled()); |
59 } | 60 } |
60 | 61 |
61 virtual void RestartJob(int pid, const std::string& command_line) OVERRIDE { | 62 virtual void RestartJob(int pid, const std::string& command_line) OVERRIDE { |
62 dbus::MethodCall method_call(login_manager::kSessionManagerInterface, | 63 dbus::MethodCall method_call(login_manager::kSessionManagerInterface, |
63 login_manager::kSessionManagerRestartJob); | 64 login_manager::kSessionManagerRestartJob); |
64 dbus::MessageWriter writer(&method_call); | 65 dbus::MessageWriter writer(&method_call); |
65 writer.AppendInt32(pid); | 66 writer.AppendInt32(pid); |
66 writer.AppendString(command_line); | 67 writer.AppendString(command_line); |
67 session_manager_proxy_->CallMethod( | 68 session_manager_proxy_->CallMethod( |
68 &method_call, | 69 &method_call, |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 650 |
650 SessionManagerClient* SessionManagerClient::Create( | 651 SessionManagerClient* SessionManagerClient::Create( |
651 DBusClientImplementationType type) { | 652 DBusClientImplementationType type) { |
652 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 653 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
653 return new SessionManagerClientImpl(); | 654 return new SessionManagerClientImpl(); |
654 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 655 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
655 return new SessionManagerClientStubImpl(); | 656 return new SessionManagerClientStubImpl(); |
656 } | 657 } |
657 | 658 |
658 } // namespace chromeos | 659 } // namespace chromeos |
OLD | NEW |