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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/net/network_errors_listing_ui.h"
6 #include <iostream>
7 #include "base/bind.h"
8 #include "base/bind_helpers.h"
9 #include "base/json/json_writer.h"
10 #include "base/strings/string_number_conversions.h"
11 #include "base/strings/utf_string_conversions.h"
12 #include "base/values.h"
13 #include "content/browser/accessibility/accessibility_tree_formatter.h"
14 #include "content/browser/accessibility/browser_accessibility_manager.h"
15 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
16 #include "content/browser/renderer_host/render_widget_host_impl.h"
17 #include "content/browser/renderer_host/render_widget_host_view_base.h"
18 #include "content/browser/web_contents/web_contents_impl.h"
19 #include "content/common/view_message_enums.h"
20 #include "content/grit/content_resources.h"
21 #include "content/public/browser/favicon_status.h"
22 #include "content/public/browser/navigation_entry.h"
23 #include "content/public/browser/render_process_host.h"
24 #include "content/public/browser/render_view_host.h"
25 #include "content/public/browser/render_widget_host.h"
26 #include "content/public/browser/render_widget_host_iterator.h"
27 #include "content/public/browser/web_contents.h"
28 #include "content/public/browser/web_ui_data_source.h"
29 #include "content/public/common/url_constants.h"
30 #include "net/base/escape.h"
31
32 namespace content {
33
34 NetworkErrorsListingUI::NetworkErrorsListingUI(WebUI* web_ui) :
35 WebUIController(web_ui) {
36 // Set up the chrome://network-errors source.
37 WebUIDataSource* html_source =
38 WebUIDataSource::Create(kChromeUINetworkErrorsListingHost);
39
40 // Add required resources.
41 html_source->SetJsonPath("strings.js");
42 html_source->AddResourcePath("networkerrorlisting.css",
43 IDR_NETWORK_ERROR_LISTING_CSS);
44 html_source->SetDefaultResource(IDR_NETWORK_ERROR_LISTING_HTML);
45
46 BrowserContext* browser_context =
47 web_ui->GetWebContents()->GetBrowserContext();
48 WebUIDataSource::Add(browser_context, html_source);
49 std::cout << "Net errors listing UI\n";
50 }
51
52 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698