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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_USER_IMAGE_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_USER_IMAGE_SOURCE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_USER_IMAGE_SOURCE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_USER_IMAGE_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // content::URLDataSource implementation. | 29 // content::URLDataSource implementation. |
30 virtual std::string GetSource() const OVERRIDE; | 30 virtual std::string GetSource() const OVERRIDE; |
31 virtual void StartDataRequest( | 31 virtual void StartDataRequest( |
32 const std::string& path, | 32 const std::string& path, |
33 int render_process_id, | 33 int render_process_id, |
34 int render_frame_id, | 34 int render_frame_id, |
35 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; | 35 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; |
36 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; | 36 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; |
37 | 37 |
38 // Returns PNG or GIF (when possible and if |is_image_animated| flag | 38 // Returns PNG encoded image for user with specified email. If there's |
39 // is true) encoded image for user with specified email. If there's | |
40 // no user with such email, returns the first default image. | 39 // no user with such email, returns the first default image. |
41 base::RefCountedMemory* GetUserImage(const std::string& email, | 40 base::RefCountedMemory* GetUserImage(const std::string& email, |
42 bool is_image_animated, | |
43 ui::ScaleFactor scale_factor) const; | 41 ui::ScaleFactor scale_factor) const; |
44 | 42 |
45 private: | 43 private: |
46 virtual ~UserImageSource(); | 44 virtual ~UserImageSource(); |
47 | 45 |
48 DISALLOW_COPY_AND_ASSIGN(UserImageSource); | 46 DISALLOW_COPY_AND_ASSIGN(UserImageSource); |
49 }; | 47 }; |
50 | 48 |
51 } // namespace options | 49 } // namespace options |
52 } // namespace chromeos | 50 } // namespace chromeos |
53 | 51 |
54 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_USER_IMAGE_SOURCE_H_ | 52 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_USER_IMAGE_SOURCE_H_ |
OLD | NEW |