| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 *result_type = TAB_CONTENTS_ABOUT_INTERNETS_STATUS_VIEW; | 192 *result_type = TAB_CONTENTS_ABOUT_INTERNETS_STATUS_VIEW; |
| 193 return true; | 193 return true; |
| 194 } | 194 } |
| 195 | 195 |
| 196 // There are a few about URLs that we hand over to the renderer. | 196 // There are a few about URLs that we hand over to the renderer. |
| 197 // If the renderer wants them, let it have them. | 197 // If the renderer wants them, let it have them. |
| 198 if (AboutHandler::WillHandle(*url)) | 198 if (AboutHandler::WillHandle(*url)) |
| 199 return false; | 199 return false; |
| 200 | 200 |
| 201 *result_type = TAB_CONTENTS_ABOUT_UI; | 201 *result_type = TAB_CONTENTS_ABOUT_UI; |
| 202 std::string about_url = "chrome-resource://about/"; | 202 std::string about_url = "chrome://about/"; |
| 203 about_url.append(url->path()); | 203 about_url.append(url->path()); |
| 204 *url = GURL(about_url); | 204 *url = GURL(about_url); |
| 205 return true; | 205 return true; |
| 206 } | 206 } |
| 207 | 207 |
| 208 BrowserAboutHandler::BrowserAboutHandler(Profile* profile, | 208 BrowserAboutHandler::BrowserAboutHandler(Profile* profile, |
| 209 SiteInstance* instance, | 209 SiteInstance* instance, |
| 210 RenderViewHostFactory* render_view_factory) : | 210 RenderViewHostFactory* render_view_factory) : |
| 211 WebContents(profile, instance, render_view_factory, MSG_ROUTING_NONE, NULL) { | 211 WebContents(profile, instance, render_view_factory, MSG_ROUTING_NONE, NULL) { |
| 212 set_type(TAB_CONTENTS_ABOUT_UI); | 212 set_type(TAB_CONTENTS_ABOUT_UI); |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 AboutSource* about_source = static_cast<AboutSource*>(source_); | 659 AboutSource* about_source = static_cast<AboutSource*>(source_); |
| 660 about_source->FinishDataRequest(template_html, request_id_); | 660 about_source->FinishDataRequest(template_html, request_id_); |
| 661 } | 661 } |
| 662 | 662 |
| 663 // static | 663 // static |
| 664 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) { | 664 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) { |
| 665 // The AboutMemoryHandler cleans itself up. | 665 // The AboutMemoryHandler cleans itself up. |
| 666 new AboutMemoryHandler(source, request_id); | 666 new AboutMemoryHandler(source, request_id); |
| 667 } | 667 } |
| 668 | 668 |
| OLD | NEW |