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

Side by Side Diff: chrome/browser/ui/webui/bookmarks_ui.h

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. Created 7 years, 8 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_BOOKMARKS_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_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 "content/public/browser/url_data_source.h" 11 #include "content/public/browser/url_data_source.h"
12 #include "content/public/browser/web_ui_controller.h" 12 #include "content/public/browser/web_ui_controller.h"
13 #include "ui/base/layout.h" 13 #include "ui/base/layout.h"
14 14
15 namespace base { 15 namespace base {
16 class RefCountedMemory; 16 class RefCountedMemory;
17 } 17 }
18 18
19 // This class provides the source for chrome://bookmarks/ 19 // This class provides the source for chrome://bookmarks/
20 class BookmarksUIHTMLSource : public content::URLDataSource { 20 class BookmarksUIHTMLSource : public content::URLDataSource {
21 public: 21 public:
22 BookmarksUIHTMLSource(); 22 BookmarksUIHTMLSource();
23 23
24 // content::URLDataSource implementation. 24 // content::URLDataSource implementation.
25 virtual std::string GetSource() OVERRIDE; 25 virtual std::string GetSource() const OVERRIDE;
26 virtual void StartDataRequest( 26 virtual void StartDataRequest(
27 const std::string& path, 27 const std::string& path,
28 bool is_incognito, 28 bool is_incognito,
29 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 29 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
30 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; 30 virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
31 31
32 private: 32 private:
33 virtual ~BookmarksUIHTMLSource(); 33 virtual ~BookmarksUIHTMLSource();
34 34
35 DISALLOW_COPY_AND_ASSIGN(BookmarksUIHTMLSource); 35 DISALLOW_COPY_AND_ASSIGN(BookmarksUIHTMLSource);
36 }; 36 };
37 37
38 // This class is used to hook up chrome://bookmarks/ which in turn gets 38 // This class is used to hook up chrome://bookmarks/ which in turn gets
39 // overridden by an extension. 39 // overridden by an extension.
40 class BookmarksUI : public content::WebUIController { 40 class BookmarksUI : public content::WebUIController {
41 public: 41 public:
42 explicit BookmarksUI(content::WebUI* web_ui); 42 explicit BookmarksUI(content::WebUI* web_ui);
43 43
44 static base::RefCountedMemory* GetFaviconResourceBytes( 44 static base::RefCountedMemory* GetFaviconResourceBytes(
45 ui::ScaleFactor scale_factor); 45 ui::ScaleFactor scale_factor);
46 46
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(BookmarksUI); 48 DISALLOW_COPY_AND_ASSIGN(BookmarksUI);
49 }; 49 };
50 50
51 #endif // CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_ 51 #endif // CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/app_launcher_page_ui.cc ('k') | chrome/browser/ui/webui/bookmarks_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698