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

Side by Side Diff: chrome/browser/ui/webui/history_ui.cc

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some style issues Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/webui/history_ui.h" 5 #include "chrome/browser/ui/webui/history_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 BrowsingHistoryHandler::~BrowsingHistoryHandler() { 125 BrowsingHistoryHandler::~BrowsingHistoryHandler() {
126 cancelable_search_consumer_.CancelAllRequests(); 126 cancelable_search_consumer_.CancelAllRequests();
127 cancelable_delete_consumer_.CancelAllRequests(); 127 cancelable_delete_consumer_.CancelAllRequests();
128 } 128 }
129 129
130 WebUIMessageHandler* BrowsingHistoryHandler::Attach(WebUI* web_ui) { 130 WebUIMessageHandler* BrowsingHistoryHandler::Attach(WebUI* web_ui) {
131 // Create our favicon data source. 131 // Create our favicon data source.
132 Profile* profile = web_ui->GetProfile(); 132 Profile* profile = web_ui->GetProfile();
133 profile->GetChromeURLDataManager()->AddDataSource( 133 profile->GetChromeURLDataManager()->AddDataSource(
134 new FaviconSource(profile)); 134 new FaviconSource(profile, chrome::kChromeUIFaviconHost));
135 135
136 // Get notifications when history is cleared. 136 // Get notifications when history is cleared.
137 registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED, 137 registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED,
138 Source<Profile>(profile->GetOriginalProfile())); 138 Source<Profile>(profile->GetOriginalProfile()));
139 return WebUIMessageHandler::Attach(web_ui); 139 return WebUIMessageHandler::Attach(web_ui);
140 } 140 }
141 141
142 void BrowsingHistoryHandler::RegisterMessages() { 142 void BrowsingHistoryHandler::RegisterMessages() {
143 web_ui_->RegisterMessageCallback("getHistory", 143 web_ui_->RegisterMessageCallback("getHistory",
144 NewCallback(this, &BrowsingHistoryHandler::HandleGetHistory)); 144 NewCallback(this, &BrowsingHistoryHandler::HandleGetHistory));
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { 392 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) {
393 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + 393 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" +
394 EscapeQueryParamValue(UTF16ToUTF8(text), true)); 394 EscapeQueryParamValue(UTF16ToUTF8(text), true));
395 } 395 }
396 396
397 // static 397 // static
398 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { 398 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() {
399 return ResourceBundle::GetSharedInstance(). 399 return ResourceBundle::GetSharedInstance().
400 LoadDataResourceBytes(IDR_HISTORY_FAVICON); 400 LoadDataResourceBytes(IDR_HISTORY_FAVICON);
401 } 401 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698