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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_
10 #include "base/compiler_specific.h"
11 #include "content/public/browser/url_data_source.h"
12 #include "content/public/browser/web_ui_controller.h"
13 #include "ui/base/layout.h"
16 class RefCountedMemory
;
19 // This class provides the source for chrome://bookmarks/
20 class BookmarksUIHTMLSource
: public content::URLDataSource
{
22 BookmarksUIHTMLSource();
24 // content::URLDataSource implementation.
25 std::string
GetSource() const override
;
26 void StartDataRequest(
27 const std::string
& path
,
28 int render_process_id
,
30 const content::URLDataSource::GotDataCallback
& callback
) override
;
31 std::string
GetMimeType(const std::string
& path
) const override
;
34 ~BookmarksUIHTMLSource() override
;
36 DISALLOW_COPY_AND_ASSIGN(BookmarksUIHTMLSource
);
39 // This class is used to hook up chrome://bookmarks/ which in turn gets
40 // overridden by an extension.
41 class BookmarksUI
: public content::WebUIController
{
43 explicit BookmarksUI(content::WebUI
* web_ui
);
45 static base::RefCountedMemory
* GetFaviconResourceBytes(
46 ui::ScaleFactor scale_factor
);
49 DISALLOW_COPY_AND_ASSIGN(BookmarksUI
);
52 #endif // CHROME_BROWSER_UI_WEBUI_BOOKMARKS_UI_H_