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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/wallpaper_source.h

Issue 11885021: Don't derive from ChromeURLDataManager::DataSource, and instead have these classes implement a dele… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
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_WALLPAPER_SOURCE_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_WALLPAPER_SOURCE_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_WALLPAPER_SOURCE_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_WALLPAPER_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted_memory.h" 11 #include "base/memory/ref_counted_memory.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 13 #include "content/public/browser/url_data_source_delegate.h"
14 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 namespace options { 17 namespace options {
18 18
19 // A DataSource for chrome://wallpaper/ URL, provides current user's wallpaper. 19 // A DataSource for chrome://wallpaper/ URL, provides current user's wallpaper.
20 class WallpaperImageSource : public ChromeURLDataManager::DataSource { 20 class WallpaperImageSource : public content::URLDataSourceDelegate {
21 public: 21 public:
22 WallpaperImageSource(); 22 WallpaperImageSource();
23 23
24 // ChromeURLDataManager::DataSource implementation. 24 // content::URLDataSourceDelegate implementation:
25 virtual std::string GetSource() OVERRIDE;
25 virtual void StartDataRequest(const std::string& path, 26 virtual void StartDataRequest(const std::string& path,
26 bool is_incognito, 27 bool is_incognito,
27 int request_id) OVERRIDE; 28 int request_id) OVERRIDE;
28 virtual std::string GetMimeType(const std::string&) const OVERRIDE; 29 virtual std::string GetMimeType(const std::string&) const OVERRIDE;
29 30
30 private: 31 private:
31 class WallpaperEncodingOperation; 32 class WallpaperEncodingOperation;
32 33
33 virtual ~WallpaperImageSource(); 34 virtual ~WallpaperImageSource();
34 35
(...skipping 17 matching lines...) Expand all
52 53
53 base::WeakPtrFactory<WallpaperImageSource> weak_ptr_factory_; 54 base::WeakPtrFactory<WallpaperImageSource> weak_ptr_factory_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(WallpaperImageSource); 56 DISALLOW_COPY_AND_ASSIGN(WallpaperImageSource);
56 }; 57 };
57 58
58 } // namespace options 59 } // namespace options
59 } // namespace chromeos 60 } // namespace chromeos
60 61
61 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_WALLPAPER_SOURCE_H_ 62 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_WALLPAPER_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698