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

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

Issue 6269015: Add facility to fix about: and file: links from chrome:// pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more automatic Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 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 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/dom_ui/new_tab_ui.h" 7 #include "chrome/browser/dom_ui/new_tab_ui.h"
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 NewTabUI::AddRecentlyClosedEntries(service->entries(), &list_value); 152 NewTabUI::AddRecentlyClosedEntries(service->entries(), &list_value);
153 153
154 dom_ui_->CallJavascriptFunction(L"recentlyClosedTabs", list_value); 154 dom_ui_->CallJavascriptFunction(L"recentlyClosedTabs", list_value);
155 } 155 }
156 156
157 void RecentlyClosedTabsHandler::TabRestoreServiceDestroyed( 157 void RecentlyClosedTabsHandler::TabRestoreServiceDestroyed(
158 TabRestoreService* service) { 158 TabRestoreService* service) {
159 tab_restore_service_ = NULL; 159 tab_restore_service_ = NULL;
160 } 160 }
161 161
162
163 /////////////////////////////////////////////////////////////////////////////// 162 ///////////////////////////////////////////////////////////////////////////////
164 // MetricsHandler 163 // MetricsHandler
165 164
166 // Let the page contents record UMA actions. Only use when you can't do it from 165 // Let the page contents record UMA actions. Only use when you can't do it from
167 // C++. For example, we currently use it to let the NTP log the postion of the 166 // C++. For example, we currently use it to let the NTP log the postion of the
168 // Most Visited or Bookmark the user clicked on, as we don't get that 167 // Most Visited or Bookmark the user clicked on, as we don't get that
169 // information through RequestOpenURL. You will need to update the metrics 168 // information through RequestOpenURL. You will need to update the metrics
170 // dashboard with the action names you use, as our processor won't catch that 169 // dashboard with the action names you use, as our processor won't catch that
171 // information (treat it as RecordComputedMetrics) 170 // information (treat it as RecordComputedMetrics)
172 class MetricsHandler : public DOMMessageHandler { 171 class MetricsHandler : public DOMMessageHandler {
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 591
593 scoped_refptr<RefCountedBytes> html_bytes( 592 scoped_refptr<RefCountedBytes> html_bytes(
594 profile_->GetNTPResourceCache()->GetNewTabHTML(is_off_the_record)); 593 profile_->GetNTPResourceCache()->GetNewTabHTML(is_off_the_record));
595 594
596 SendResponse(request_id, html_bytes); 595 SendResponse(request_id, html_bytes);
597 } 596 }
598 597
599 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const { 598 std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string&) const {
600 return "text/html"; 599 return "text/html";
601 } 600 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/generic_handler.cc ('k') | chrome/browser/dom_ui/options/content_settings_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698