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

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

Issue 10238016: convert history page to loadTimeData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 #include "chrome/browser/ui/webui/history_ui.h" 5 #include "chrome/browser/ui/webui/history_ui.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 //////////////////////////////////////////////////////////////////////////////// 464 ////////////////////////////////////////////////////////////////////////////////
465 // 465 //
466 // HistoryUI 466 // HistoryUI
467 // 467 //
468 //////////////////////////////////////////////////////////////////////////////// 468 ////////////////////////////////////////////////////////////////////////////////
469 469
470 HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) { 470 HistoryUI::HistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) {
471 web_ui->AddMessageHandler(new BrowsingHistoryHandler()); 471 web_ui->AddMessageHandler(new BrowsingHistoryHandler());
472 472
473 // Set up the chrome://history-frame/ source.
473 HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource(); 474 HistoryUIHTMLSource* html_source = new HistoryUIHTMLSource();
474 475 html_source->set_use_json_js_format_v2();
475 // Set up the chrome://history-frame/ source. 476 ChromeURLDataManager::AddDataSource(Profile::FromWebUI(web_ui), html_source);
476 Profile* profile = Profile::FromWebUI(web_ui);
477 ChromeURLDataManager::AddDataSource(profile, html_source);
478 } 477 }
479 478
480 // static 479 // static
481 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) { 480 const GURL HistoryUI::GetHistoryURLWithSearchText(const string16& text) {
482 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" + 481 return GURL(std::string(chrome::kChromeUIHistoryURL) + "#q=" +
483 net::EscapeQueryParamValue(UTF16ToUTF8(text), true)); 482 net::EscapeQueryParamValue(UTF16ToUTF8(text), true));
484 } 483 }
485 484
486 // static 485 // static
487 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { 486 RefCountedMemory* HistoryUI::GetFaviconResourceBytes() {
488 return ResourceBundle::GetSharedInstance(). 487 return ResourceBundle::GetSharedInstance().
489 LoadDataResourceBytes(IDR_HISTORY_FAVICON); 488 LoadDataResourceBytes(IDR_HISTORY_FAVICON);
490 } 489 }
OLDNEW
« chrome/browser/resources/history/history.js ('K') | « chrome/browser/resources/history/history.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698