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

Side by Side Diff: chrome/utility/media_galleries/media_metadata_parser.h

Issue 1791623002: Revert of Media Galleries Partial Deprecation: Remove image metadata & libexif. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual revert/rebase. Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_MEDIA_METADATA_PARSER_H_ 5 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_MEDIA_METADATA_PARSER_H_
6 #define CHROME_UTILITY_MEDIA_GALLERIES_MEDIA_METADATA_PARSER_H_ 6 #define CHROME_UTILITY_MEDIA_GALLERIES_MEDIA_METADATA_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/common/extensions/api/media_galleries.h" 14 #include "chrome/common/extensions/api/media_galleries.h"
15 #include "chrome/common/media_galleries/metadata_types.h" 15 #include "chrome/common/media_galleries/metadata_types.h"
16 16
17 namespace base { 17 namespace base {
18 class Thread; 18 class Thread;
19 } 19 }
20 20
21 namespace media { 21 namespace media {
22 class DataSource; 22 class DataSource;
23 } 23 }
24 24
25 namespace metadata { 25 namespace metadata {
26 26
27 // This class takes a MIME type and data source and parses its metadata. It 27 // This class takes a MIME type and data source and parses its metadata. It
28 // handles audio, video, and images. It delegates its operations to FFMPEG. 28 // handles audio, video, and images. It delegates its operations to FFMPEG,
29 // This class lives and operates on the utility thread of the utility process, 29 // libexif, etc. This class lives and operates on the utility thread of the
30 // as we wish to sandbox potentially dangerous operations on user-provided data. 30 // utility process, as we wish to sandbox potentially dangerous operations
31 // on user-provided data.
31 class MediaMetadataParser { 32 class MediaMetadataParser {
32 public: 33 public:
33 typedef extensions::api::media_galleries::MediaMetadata MediaMetadata; 34 typedef extensions::api::media_galleries::MediaMetadata MediaMetadata;
34 typedef base::Callback< 35 typedef base::Callback<
35 void(const MediaMetadata& metadata, 36 void(const MediaMetadata& metadata,
36 const std::vector<AttachedImage>& attached_images)> 37 const std::vector<AttachedImage>& attached_images)>
37 MetadataCallback; 38 MetadataCallback;
38 39
39 // Does not take ownership of |source|. Caller is responsible for ensuring 40 // Does not take ownership of |source|. Caller is responsible for ensuring
40 // that |source| outlives this object. 41 // that |source| outlives this object.
(...skipping 18 matching lines...) Expand all
59 // TODO(tommycli): Replace with a reference to a WorkerPool if we ever use 60 // TODO(tommycli): Replace with a reference to a WorkerPool if we ever use
60 // this class in batch mode. 61 // this class in batch mode.
61 scoped_ptr<base::Thread> media_thread_; 62 scoped_ptr<base::Thread> media_thread_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(MediaMetadataParser); 64 DISALLOW_COPY_AND_ASSIGN(MediaMetadataParser);
64 }; 65 };
65 66
66 } // namespace metadata 67 } // namespace metadata
67 68
68 #endif // CHROME_UTILITY_MEDIA_GALLERIES_MEDIA_METADATA_PARSER_H_ 69 #endif // CHROME_UTILITY_MEDIA_GALLERIES_MEDIA_METADATA_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698