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

Unified Diff: chrome/browser/media_gallery/linux/mtp_device_object_enumerator.h

Issue 11348337: Move MTPDeviceDelegateImplLinux worker classes to its own files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 years 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/media_gallery/linux/mtp_device_object_enumerator.h
diff --git a/chrome/browser/media_gallery/linux/mtp_device_object_enumerator.h b/chrome/browser/media_gallery/linux/mtp_device_object_enumerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..d7ea79af0faab7308ad2baa7f95c161689da308a
--- /dev/null
+++ b/chrome/browser/media_gallery/linux/mtp_device_object_enumerator.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2012 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_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_
+#define CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_
+
+#include <vector>
+
+#include "base/file_path.h"
+#include "base/time.h"
+#include "chrome/browser/media_transfer_protocol/mtp_file_entry.pb.h"
+#include "webkit/fileapi/file_system_file_util.h"
+
+namespace chrome {
+
+typedef std::vector<MtpFileEntry> MtpFileEntries;
+
+// Used to enumerate top-level files of an media file system.
+class MTPDeviceObjectEnumerator
+ : public fileapi::FileSystemFileUtil::AbstractFileEnumerator {
+ public:
+ explicit MTPDeviceObjectEnumerator(const MtpFileEntries& entries);
+
+ virtual ~MTPDeviceObjectEnumerator();
+
+ // AbstractFileEnumerator:
+ virtual FilePath Next() OVERRIDE;
+ virtual int64 Size() OVERRIDE;
+ virtual bool IsDirectory() OVERRIDE;
+ virtual base::Time LastModifiedTime() OVERRIDE;
+
+ private:
+ // List of directory file entries information.
+ const MtpFileEntries file_entries_;
+
+ // Iterator to access the individual file entries.
+ MtpFileEntries::const_iterator file_entry_iter_;
+
+ // Stores the current file information.
+ MtpFileEntry current_file_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(MTPDeviceObjectEnumerator);
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_MEDIA_GALLERY_LINUX_MTP_DEVICE_OBJECT_ENUMERATOR_H_

Powered by Google App Engine
This is Rietveld 408576698