| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_UI_WEBUI_CHROMEOS_IMAGE_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGE_SOURCE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGE_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGE_SOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "content/public/browser/url_data_source.h" | 14 #include "content/public/browser/url_data_source.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
| 18 } | 18 } |
| 19 | 19 |
| 20 // TODO(michaelpg): Remove dependency on user_manager. | |
| 21 namespace user_manager { | |
| 22 class UserImage; | |
| 23 } | |
| 24 | |
| 25 namespace chromeos { | 20 namespace chromeos { |
| 26 | 21 |
| 27 // Data source that reads and decodes an image from the RO file system. | 22 // Data source that reads and decodes an image from the RO file system. |
| 28 class ImageSource : public content::URLDataSource { | 23 class ImageSource : public content::URLDataSource { |
| 29 public: | 24 public: |
| 30 ImageSource(); | 25 ImageSource(); |
| 31 ~ImageSource() override; | 26 ~ImageSource() override; |
| 32 | 27 |
| 33 // content::URLDataSource implementation. | 28 // content::URLDataSource implementation. |
| 34 std::string GetSource() const override; | 29 std::string GetSource() const override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 54 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 49 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 55 | 50 |
| 56 base::WeakPtrFactory<ImageSource> weak_factory_; | 51 base::WeakPtrFactory<ImageSource> weak_factory_; |
| 57 | 52 |
| 58 DISALLOW_COPY_AND_ASSIGN(ImageSource); | 53 DISALLOW_COPY_AND_ASSIGN(ImageSource); |
| 59 }; | 54 }; |
| 60 | 55 |
| 61 } // namespace chromeos | 56 } // namespace chromeos |
| 62 | 57 |
| 63 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGE_SOURCE_H_ | 58 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IMAGE_SOURCE_H_ |
| OLD | NEW |