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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/bookmarks_ui.cc
===================================================================
--- chrome/browser/dom_ui/bookmarks_ui.cc (revision 0)
+++ chrome/browser/dom_ui/bookmarks_ui.cc (revision 0)
@@ -0,0 +1,57 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/dom_ui/bookmarks_ui.h"
+
+#include "app/resource_bundle.h"
+#include "base/message_loop.h"
+#include "base/ref_counted_memory.h"
+#include "base/singleton.h"
+#include "base/string_piece.h"
+#include "base/string_util.h"
+#include "chrome/browser/chrome_thread.h"
+#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
+#include "chrome/common/url_constants.h"
+#include "grit/browser_resources.h"
+#include "grit/theme_resources.h"
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// BookmarksUIHTMLSource
+//
+////////////////////////////////////////////////////////////////////////////////
+
+BookmarksUIHTMLSource::BookmarksUIHTMLSource()
+ : DataSource(chrome::kChromeUIBookmarksHost, MessageLoop::current()) {
+}
+
+void BookmarksUIHTMLSource::StartDataRequest(const std::string& path,
+ bool is_off_the_record, int request_id) {
+ NOTREACHED() << "We should never get here since the extension should have"
+ << "been triggered";
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// BookmarksUI
+//
+////////////////////////////////////////////////////////////////////////////////
+
+BookmarksUI::BookmarksUI(TabContents* contents) : DOMUI(contents) {
+ BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource();
+
+ // Set up the chrome://bookmarks/ source.
+ ChromeThread::PostTask(
+ ChromeThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ Singleton<ChromeURLDataManager>::get(),
+ &ChromeURLDataManager::AddDataSource,
+ make_scoped_refptr(html_source)));
+}
+
+// static
+RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() {
+ return ResourceBundle::GetSharedInstance().
+ LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON);
+}
Property changes on: chrome\browser\dom_ui\bookmarks_ui.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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