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

Side by Side Diff: chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source2.h

Issue 10698140: Remove "2" suffixes from options2 code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE2_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE2_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
13
14 namespace chromeos {
15 namespace options2 {
16
17 // Returns a string consisting of the prefix specified and the index of the
18 // image. For example: chrome://wallpaper/default_2.
19 std::string GetDefaultWallpaperThumbnailURL(int index);
20
21 // Checks if the given URL points to one of the default wallpapers. If it is,
22 // returns true and sets |wallpaper_index| to the corresponding index parsed
23 // from |url|. For example: chrome://wallpaper/default_2 will set
24 // |wallpaper_index| to 2. If not a default wallpaper url, returns false.
25 // |url| and |wallpaper_index| must not be NULL.
26 bool IsDefaultWallpaperURL(const std::string url, int* wallpaper_index);
27
28 // A DataSource for chrome://wallpaper/ URLs.
29 class WallpaperThumbnailSource : public ChromeURLDataManager::DataSource {
30 public:
31 WallpaperThumbnailSource();
32
33 // ChromeURLDataManager::DataSource implementation.
34 virtual void StartDataRequest(const std::string& path,
35 bool is_incognito,
36 int request_id) OVERRIDE;
37 virtual std::string GetMimeType(const std::string&) const OVERRIDE;
38
39 private:
40 virtual ~WallpaperThumbnailSource();
41
42 DISALLOW_COPY_AND_ASSIGN(WallpaperThumbnailSource);
43 };
44
45 } // namespace options2
46 } // namespace chromeos
47
48 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_WALLPAPER_THUMBNAIL_SOURCE2 _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698