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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 18728: Create a dialog box for the about:network view and kill the tab type.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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) 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 12 matching lines...) Expand all
23 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 23 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
24 #include "chrome/browser/memory_details.h" 24 #include "chrome/browser/memory_details.h"
25 #include "chrome/browser/net/dns_global.h" 25 #include "chrome/browser/net/dns_global.h"
26 #include "chrome/browser/plugin_process_host.h" 26 #include "chrome/browser/plugin_process_host.h"
27 #include "chrome/browser/plugin_service.h" 27 #include "chrome/browser/plugin_service.h"
28 #include "chrome/browser/profile.h" 28 #include "chrome/browser/profile.h"
29 #include "chrome/browser/profile_manager.h" 29 #include "chrome/browser/profile_manager.h"
30 #include "chrome/browser/renderer_host/render_process_host.h" 30 #include "chrome/browser/renderer_host/render_process_host.h"
31 #include "chrome/browser/renderer_host/render_view_host.h" 31 #include "chrome/browser/renderer_host/render_view_host.h"
32 #include "chrome/browser/tab_contents/ipc_status_view.h" 32 #include "chrome/browser/tab_contents/ipc_status_view.h"
33 #include "chrome/browser/views/about_network_dialog.h"
33 #include "chrome/common/jstemplate_builder.h" 34 #include "chrome/common/jstemplate_builder.h"
34 #include "chrome/common/l10n_util.h" 35 #include "chrome/common/l10n_util.h"
35 #include "chrome/common/pref_names.h" 36 #include "chrome/common/pref_names.h"
36 #include "chrome/common/pref_service.h" 37 #include "chrome/common/pref_service.h"
37 #include "chrome/common/resource_bundle.h" 38 #include "chrome/common/resource_bundle.h"
38 #include "chrome/renderer/about_handler.h" 39 #include "chrome/renderer/about_handler.h"
39 #include "googleurl/src/gurl.h" 40 #include "googleurl/src/gurl.h"
40 #include "webkit/glue/webkit_glue.h" 41 #include "webkit/glue/webkit_glue.h"
41 #ifdef CHROME_V8 42 #ifdef CHROME_V8
42 #include "v8/include/v8.h" 43 #include "v8/include/v8.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 167 }
167 168
168 // We create an about:cache mapping to the view-cache: internal URL. 169 // We create an about:cache mapping to the view-cache: internal URL.
169 if (StringToLowerASCII(url->path()) == kCachePath) { 170 if (StringToLowerASCII(url->path()) == kCachePath) {
170 *url = GURL("view-cache:"); 171 *url = GURL("view-cache:");
171 *result_type = TAB_CONTENTS_WEB; 172 *result_type = TAB_CONTENTS_WEB;
172 return true; 173 return true;
173 } 174 }
174 175
175 if (LowerCaseEqualsASCII(url->path(), "network")) { 176 if (LowerCaseEqualsASCII(url->path(), "network")) {
176 // about:network doesn't have an internal protocol, so don't modify |url|. 177 // Run the dialog. This will re-use the existing one if it's already up.
177 *result_type = TAB_CONTENTS_NETWORK_STATUS_VIEW; 178 AboutNetworkDialog::RunDialog();
178 return true; 179
180 // Navigate the renderer to about:blank. This is kind of stupid but is the
181 // easiest thing to do in this situation without adding a lot of complexity
182 // for this developer-only feature.
183 *url = GURL("about:blank");
184 return false;
179 } 185 }
180 186
181 #ifdef IPC_MESSAGE_LOG_ENABLED 187 #ifdef IPC_MESSAGE_LOG_ENABLED
182 if ((LowerCaseEqualsASCII(url->path(), "ipc")) && 188 if ((LowerCaseEqualsASCII(url->path(), "ipc")) &&
183 (IPCStatusView::current() == NULL)) { 189 (IPCStatusView::current() == NULL)) {
184 // about:ipc doesn't have an internal protocol, so don't modify |url|. 190 // about:ipc doesn't have an internal protocol, so don't modify |url|.
185 *result_type = TAB_CONTENTS_IPC_STATUS_VIEW; 191 *result_type = TAB_CONTENTS_IPC_STATUS_VIEW;
186 return true; 192 return true;
187 } 193 }
188 #endif 194 #endif
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 AboutSource* about_source = static_cast<AboutSource*>(source_); 659 AboutSource* about_source = static_cast<AboutSource*>(source_);
654 about_source->FinishDataRequest(template_html, request_id_); 660 about_source->FinishDataRequest(template_html, request_id_);
655 } 661 }
656 662
657 // static 663 // static
658 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) { 664 void BrowserAboutHandler::AboutMemory(AboutSource* source, int request_id) {
659 // The AboutMemoryHandler cleans itself up. 665 // The AboutMemoryHandler cleans itself up.
660 new AboutMemoryHandler(source, request_id); 666 new AboutMemoryHandler(source, request_id);
661 } 667 }
662 668
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698