| 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 "chrome/browser/media_transfer_protocol/media_transfer_protocol_daemon_
client.h" | 5 #include "device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chrome/browser/media_transfer_protocol/mtp_file_entry.pb.h" | |
| 10 #include "chrome/browser/media_transfer_protocol/mtp_storage_info.pb.h" | |
| 11 #include "dbus/bus.h" | 9 #include "dbus/bus.h" |
| 12 #include "dbus/message.h" | 10 #include "dbus/message.h" |
| 13 #include "dbus/object_path.h" | 11 #include "dbus/object_path.h" |
| 14 #include "dbus/object_proxy.h" | 12 #include "dbus/object_proxy.h" |
| 13 #include "device/media_transfer_protocol/mtp_file_entry.pb.h" |
| 14 #include "device/media_transfer_protocol/mtp_storage_info.pb.h" |
| 15 #include "third_party/cros_system_api/dbus/service_constants.h" | 15 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 16 | 16 |
| 17 namespace chrome { | 17 namespace device { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const char kInvalidResponseMsg[] = "Invalid Response: "; | 21 const char kInvalidResponseMsg[] = "Invalid Response: "; |
| 22 | 22 |
| 23 // The MediaTransferProtocolDaemonClient implementation. | 23 // The MediaTransferProtocolDaemonClient implementation. |
| 24 class MediaTransferProtocolDaemonClientImpl | 24 class MediaTransferProtocolDaemonClientImpl |
| 25 : public MediaTransferProtocolDaemonClient { | 25 : public MediaTransferProtocolDaemonClient { |
| 26 public: | 26 public: |
| 27 explicit MediaTransferProtocolDaemonClientImpl(dbus::Bus* bus) | 27 explicit MediaTransferProtocolDaemonClientImpl(dbus::Bus* bus) |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 MediaTransferProtocolDaemonClient::~MediaTransferProtocolDaemonClient() {} | 479 MediaTransferProtocolDaemonClient::~MediaTransferProtocolDaemonClient() {} |
| 480 | 480 |
| 481 // static | 481 // static |
| 482 MediaTransferProtocolDaemonClient* | 482 MediaTransferProtocolDaemonClient* |
| 483 MediaTransferProtocolDaemonClient::Create(dbus::Bus* bus, bool is_stub) { | 483 MediaTransferProtocolDaemonClient::Create(dbus::Bus* bus, bool is_stub) { |
| 484 if (is_stub) | 484 if (is_stub) |
| 485 return new MediaTransferProtocolDaemonClientStubImpl(); | 485 return new MediaTransferProtocolDaemonClientStubImpl(); |
| 486 return new MediaTransferProtocolDaemonClientImpl(bus); | 486 return new MediaTransferProtocolDaemonClientImpl(bus); |
| 487 } | 487 } |
| 488 | 488 |
| 489 } // namespace chrome | 489 } // namespace device |
| OLD | NEW |