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

Side by Side Diff: chrome/browser/dom_ui/bookmarks_ui.cc

Issue 661019: Add command line option to use a tabbed bookmark manager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « chrome/browser/dom_ui/bookmarks_ui.h ('k') | chrome/browser/dom_ui/dom_ui_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #include "chrome/browser/dom_ui/bookmarks_ui.h"
6
7 #include "app/resource_bundle.h"
8 #include "base/message_loop.h"
9 #include "base/ref_counted_memory.h"
10 #include "base/singleton.h"
11 #include "base/string_piece.h"
12 #include "base/string_util.h"
13 #include "chrome/browser/chrome_thread.h"
14 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
15 #include "chrome/common/url_constants.h"
16 #include "grit/browser_resources.h"
17 #include "grit/theme_resources.h"
18
19 ////////////////////////////////////////////////////////////////////////////////
20 //
21 // BookmarksUIHTMLSource
22 //
23 ////////////////////////////////////////////////////////////////////////////////
24
25 BookmarksUIHTMLSource::BookmarksUIHTMLSource()
26 : DataSource(chrome::kChromeUIBookmarksHost, MessageLoop::current()) {
27 }
28
29 void BookmarksUIHTMLSource::StartDataRequest(const std::string& path,
30 bool is_off_the_record, int request_id) {
31 NOTREACHED() << "We should never get here since the extension should have"
32 << "been triggered";
33 }
34
35 ////////////////////////////////////////////////////////////////////////////////
36 //
37 // BookmarksUI
38 //
39 ////////////////////////////////////////////////////////////////////////////////
40
41 BookmarksUI::BookmarksUI(TabContents* contents) : DOMUI(contents) {
42 BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource();
43
44 // Set up the chrome://bookmarks/ source.
45 ChromeThread::PostTask(
46 ChromeThread::IO, FROM_HERE,
47 NewRunnableMethod(
48 Singleton<ChromeURLDataManager>::get(),
49 &ChromeURLDataManager::AddDataSource,
50 make_scoped_refptr(html_source)));
51 }
52
53 // static
54 RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() {
55 return ResourceBundle::GetSharedInstance().
56 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON);
57 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/bookmarks_ui.h ('k') | chrome/browser/dom_ui/dom_ui_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698