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

Unified Diff: content/browser/net/network_errors_listing_ui.cc

Issue 1421743002: Implement chrome://network-errors for direct access to network error interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/net/network_errors_listing_ui.cc
diff --git a/content/browser/net/network_errors_listing_ui.cc b/content/browser/net/network_errors_listing_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a2e637c0d95cb94468ff43f45f0ab452651f9ede
--- /dev/null
+++ b/content/browser/net/network_errors_listing_ui.cc
@@ -0,0 +1,52 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/net/network_errors_listing_ui.h"
+#include <iostream>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+#include "base/json/json_writer.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
+#include "content/browser/accessibility/accessibility_tree_formatter.h"
+#include "content/browser/accessibility/browser_accessibility_manager.h"
+#include "content/browser/accessibility/browser_accessibility_state_impl.h"
+#include "content/browser/renderer_host/render_widget_host_impl.h"
+#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/web_contents/web_contents_impl.h"
+#include "content/common/view_message_enums.h"
+#include "content/grit/content_resources.h"
+#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
+#include "content/public/browser/render_widget_host_iterator.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "content/public/common/url_constants.h"
+#include "net/base/escape.h"
+
+namespace content {
+
+NetworkErrorsListingUI::NetworkErrorsListingUI(WebUI* web_ui) :
+ WebUIController(web_ui) {
+ // Set up the chrome://network-errors source.
+ WebUIDataSource* html_source =
+ WebUIDataSource::Create(kChromeUINetworkErrorsListingHost);
+
+ // Add required resources.
+ html_source->SetJsonPath("strings.js");
+ html_source->AddResourcePath("networkerrorlisting.css",
+ IDR_NETWORK_ERROR_LISTING_CSS);
+ html_source->SetDefaultResource(IDR_NETWORK_ERROR_LISTING_HTML);
+
+ BrowserContext* browser_context =
+ web_ui->GetWebContents()->GetBrowserContext();
+ WebUIDataSource::Add(browser_context, html_source);
+ std::cout << "Net errors listing UI\n";
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698