diff options
26 files changed, 0 insertions, 388 deletions
diff --git a/chrome/browser/ui/webui/DEPS b/chrome/browser/ui/webui/DEPS index 7a5531e..6461fcc 100644 --- a/chrome/browser/ui/webui/DEPS +++ b/chrome/browser/ui/webui/DEPS @@ -9,8 +9,4 @@ include_rules = [ "+device/bluetooth", "+third_party/angle", # For ANGLE version. "+third_party/zlib/zlib.h", # For compression level constants. - - # DOM Distiller. - "+components/dom_distiller/core", - "+components/dom_distiller/webui", ] diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index cb3075c..6d2018e 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc @@ -55,8 +55,6 @@ #include "chrome/common/extensions/feature_switch.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "components/dom_distiller/core/dom_distiller_constants.h" -#include "components/dom_distiller/webui/dom_distiller_ui.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/content_client.h" @@ -239,11 +237,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI<LocalDiscoveryUI>; } #endif - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableDomDistiller) && - url.host() == dom_distiller::kChromeUIDomDistillerHost) { - return &NewWebUI<dom_distiller::DomDistillerUI>; - } if (url.host() == chrome::kChromeUIFlagsHost) return &NewWebUI<FlagsUI>; if (url.host() == chrome::kChromeUIHistoryFrameHost) diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index ebc4228..9d4593e 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -2460,8 +2460,6 @@ 'installer_util', '../components/components.gyp:autofill_content_risk_proto', '../components/component_strings.gyp:component_strings', - '../components/components.gyp:dom_distiller_core', - '../components/components.gyp:dom_distiller_webui', '../device/bluetooth/bluetooth.gyp:device_bluetooth', '../media/media.gyp:media', '../net/net.gyp:net_with_v8', diff --git a/chrome/chrome_repack_resources.gypi b/chrome/chrome_repack_resources.gypi index f442cd2..7480c2d 100644 --- a/chrome/chrome_repack_resources.gypi +++ b/chrome/chrome_repack_resources.gypi @@ -19,7 +19,6 @@ 'conditions': [ ['OS != "ios"', { 'pak_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/components/dom_distiller_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 0c07489..4500f75 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -573,9 +573,6 @@ const char kEnableDevToolsExperiments[] = "enable-devtools-experiments"; // opt in to "Use web service to resolve navigation errors".) const char kEnableDnsProbes[] = "enable-dns-probes"; -// Enables the DOM distiller. -const char kEnableDomDistiller[] = "enable-dom-distiller"; - // Enables extensions to be easily installed from sites other than the web // store. Without this flag, they can still be installed, but must be manually // dragged onto chrome://extensions/. diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 7ad8790..fdb0d91 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -171,7 +171,6 @@ extern const char kEnableComponentCloudPolicy[]; extern const char kEnableContacts[]; extern const char kEnableDevToolsExperiments[]; extern const char kEnableDnsProbes[]; -extern const char kEnableDomDistiller[]; extern const char kEnableExtensionActivityLogging[]; extern const char kEnableExtensionActivityLogTesting[]; extern const char kEnableFastUnload[]; diff --git a/components/OWNERS b/components/OWNERS index 4c134eb..2c71d95 100644 --- a/components/OWNERS +++ b/components/OWNERS @@ -8,10 +8,6 @@ per-file breakpad.gypi=jochen@chromium.org per-file breakpad.gypi=rsesek@chromium.org per-file breakpad.gypi=thestig@chromium.org -per-file dom_distiller*=bengr@chromium.org -per-file dom_distiller*=cjhopman@chromium.org -per-file dom_distiller*=nyquist@chromium.org - per-file json_schema.gypi=asargent@chromium.org per-file json_schema.gypi=calamity@chromium.org per-file json_schema.gypi=kalman@chromium.org diff --git a/components/component_strings.grd b/components/component_strings.grd index 28e2a46..85b5d61 100644 --- a/components/component_strings.grd +++ b/components/component_strings.grd @@ -168,7 +168,6 @@ <release seq="1" allow_pseudo="false"> <messages fallback_to_english="true"> <part file="autofill_strings.grdp" /> - <part file="dom_distiller_strings.grdp" /> </messages> </release> </grit> diff --git a/components/components.gyp b/components/components.gyp index 0bfe536..02f190b 100644 --- a/components/components.gyp +++ b/components/components.gyp @@ -15,7 +15,6 @@ 'breakpad.gypi', 'browser_context_keyed_service.gypi', 'components_tests.gypi', - 'dom_distiller.gypi', 'json_schema.gypi', 'navigation_interception.gypi', 'policy.gypi', diff --git a/components/dom_distiller.gypi b/components/dom_distiller.gypi deleted file mode 100644 index 82d31af..0000000 --- a/components/dom_distiller.gypi +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 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. - -{ - 'targets': [ - { - 'target_name': 'dom_distiller_core', - 'type': 'static_library', - 'include_dirs': [ - '..', - ], - 'sources': [ - 'dom_distiller/core/dom_distiller_constants.cc', - 'dom_distiller/core/dom_distiller_constants.h', - ], - }, - { - 'target_name': 'dom_distiller_webui', - 'type': 'static_library', - 'dependencies': [ - 'component_strings.gyp:component_strings', - 'dom_distiller_core', - 'dom_distiller_resources', - '../base/base.gyp:base', - '../base/base.gyp:base', - '../content/content.gyp:content_browser', - '../skia/skia.gyp:skia', - ], - 'include_dirs': [ - '..', - ], - 'sources': [ - 'dom_distiller/webui/dom_distiller_ui.cc', - 'dom_distiller/webui/dom_distiller_ui.h', - 'dom_distiller/webui/dom_distiller_handler.cc', - 'dom_distiller/webui/dom_distiller_handler.h', - ], - }, - { - 'target_name': 'dom_distiller_resources', - 'type': 'none', - 'variables': { - 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/components', - }, - 'actions': [ - { - 'action_name': 'dom_distiller_resources', - 'variables': { - 'grit_grd_file': 'dom_distiller_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - ], - 'includes': [ '../build/grit_target.gypi' ], - }, - ], -} diff --git a/components/dom_distiller/DEPS b/components/dom_distiller/DEPS deleted file mode 100644 index 66f3cb1..0000000 --- a/components/dom_distiller/DEPS +++ /dev/null @@ -1,10 +0,0 @@ -include_rules = [ - "+grit", # For generated headers. - - # The dom distiller is a layered component; subdirectories must explicitly - # introduce the ability to use the content layer as appropriate. - # http://www.chromium.org/developers/design-documents/layered-components-design - "-components/dom_distiller", - "+components/dom_distiller/core", - "-content/public", -]
\ No newline at end of file diff --git a/components/dom_distiller/OWNERS b/components/dom_distiller/OWNERS deleted file mode 100644 index f2ce81c..0000000 --- a/components/dom_distiller/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -bengr@chromium.org -cjhopman@chromium.org -nyquist@chromium.org diff --git a/components/dom_distiller/README b/components/dom_distiller/README deleted file mode 100644 index e8d7bb3..0000000 --- a/components/dom_distiller/README +++ /dev/null @@ -1,12 +0,0 @@ -The DOM Distiller component contains code for an experimental prototype for -distilling the core part of a web page. - -To enable this feature, use the command line flag --enable-distiller. - -The DOM Distiller is a layered component. See: -http://www.chromium.org/developers/design-documents/layered-components-design - -Folder structure: - - core/ contains the business logic of the component. - webui/ contains the WebUI code and resources for the debug page. diff --git a/components/dom_distiller/core/dom_distiller_constants.cc b/components/dom_distiller/core/dom_distiller_constants.cc deleted file mode 100644 index 5dea000..0000000 --- a/components/dom_distiller/core/dom_distiller_constants.cc +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 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 "components/dom_distiller/core/dom_distiller_constants.h" - -namespace dom_distiller { - -const char kChromeUIDomDistillerURL[] = "chrome://dom-distiller/"; -const char kChromeUIDomDistillerHost[] = "dom-distiller"; - -} // namespace dom_distiller diff --git a/components/dom_distiller/core/dom_distiller_constants.h b/components/dom_distiller/core/dom_distiller_constants.h deleted file mode 100644 index c39c88e..0000000 --- a/components/dom_distiller/core/dom_distiller_constants.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 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. - -#ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_CONSTANTS_H_ -#define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_CONSTANTS_H_ - -namespace dom_distiller { - -extern const char kChromeUIDomDistillerURL[]; -extern const char kChromeUIDomDistillerHost[]; - -} // namespace dom_distiller - -#endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_CONSTANTS_H_ diff --git a/components/dom_distiller/webui/DEPS b/components/dom_distiller/webui/DEPS deleted file mode 100644 index 2c43d7a..0000000 --- a/components/dom_distiller/webui/DEPS +++ /dev/null @@ -1,13 +0,0 @@ -include_rules = [ - "+components/dom_distiller/webui", - "+ui/webui/resources", - # The webui of this component needs to depend on content, but since it is - # also supposed to be working on iOS, and there is currently no concrete plan - # yet for extracting webui as something that is reusable across iOS and other - # platforms, this DEPS rule is kept instead. - # To ensure this DEPS rule is not a nuisance to engineers refactoring the - # content layer, it is currently quite broad instead of the more strict - # approach directly allowing the header files that are currently included from - # content. - "+content/public/browser", -]
\ No newline at end of file diff --git a/components/dom_distiller/webui/dom_distiller_handler.cc b/components/dom_distiller/webui/dom_distiller_handler.cc deleted file mode 100644 index c05cc0d..0000000 --- a/components/dom_distiller/webui/dom_distiller_handler.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 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 "components/dom_distiller/webui/dom_distiller_handler.h" - -#include "base/bind.h" -#include "base/values.h" -#include "content/public/browser/web_ui.h" - -namespace dom_distiller { - -DomDistillerHandler::DomDistillerHandler() - : weak_ptr_factory_(this) { -} - -DomDistillerHandler::~DomDistillerHandler() {} - -void DomDistillerHandler::RegisterMessages() { - web_ui()->RegisterMessageCallback( - "requestEntries", - base::Bind(&DomDistillerHandler::HandleRequestEntries, - base::Unretained(this))); -} - -void DomDistillerHandler::HandleRequestEntries(const ListValue* args) { - base::ListValue entries; - - // Add some temporary placeholder entries. - scoped_ptr<base::DictionaryValue> entry1(new base::DictionaryValue()); - entry1->SetString("title", "Google"); - entry1->SetString("url", "http://www.google.com/"); - entries.Append(entry1.release()); - scoped_ptr<base::DictionaryValue> entry2(new base::DictionaryValue()); - entry2->SetString("title", "Chrome"); - entry2->SetString("url", "http://www.chrome.com/"); - entries.Append(entry2.release()); - - web_ui()->CallJavascriptFunction("onGotEntries", entries); -} - -} // namespace dom_distiller diff --git a/components/dom_distiller/webui/dom_distiller_handler.h b/components/dom_distiller/webui/dom_distiller_handler.h deleted file mode 100644 index 2af6d34..0000000 --- a/components/dom_distiller/webui/dom_distiller_handler.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 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. - -#ifndef COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_ -#define COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_ - -#include <vector> - -#include "base/memory/weak_ptr.h" -#include "base/values.h" -#include "content/public/browser/web_ui_message_handler.h" - -namespace dom_distiller { - -// Handler class for DOM Distiller page operations. -class DomDistillerHandler : public content::WebUIMessageHandler { - public: - DomDistillerHandler(); - virtual ~DomDistillerHandler(); - - // content::WebUIMessageHandler implementation. - virtual void RegisterMessages() OVERRIDE; - - // Callback for the "requestEntries" message. This synchronously requests the - // list of entries and returns it to the front end. - virtual void HandleRequestEntries(const ListValue* args); - - private: - // Factory for the creating refs in callbacks. - base::WeakPtrFactory<DomDistillerHandler> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(DomDistillerHandler); -}; - -} // namespace dom_distiller - -#endif // COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_HANDLER_H_ diff --git a/components/dom_distiller/webui/dom_distiller_ui.cc b/components/dom_distiller/webui/dom_distiller_ui.cc deleted file mode 100644 index e141843..0000000 --- a/components/dom_distiller/webui/dom_distiller_ui.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 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 "components/dom_distiller/webui/dom_distiller_ui.h" - -#include "components/dom_distiller/core/dom_distiller_constants.h" -#include "components/dom_distiller/webui/dom_distiller_handler.h" -#include "content/public/browser/browser_context.h" -#include "content/public/browser/web_contents.h" -#include "content/public/browser/web_ui.h" -#include "content/public/browser/web_ui_data_source.h" -#include "grit/component_strings.h" -#include "grit/dom_distiller_resources.h" - -namespace dom_distiller { - -DomDistillerUI::DomDistillerUI(content::WebUI* web_ui) - : content::WebUIController(web_ui) { - // Set up WebUIDataSource. - content::WebUIDataSource* source = - content::WebUIDataSource::Create(kChromeUIDomDistillerHost); - source->SetDefaultResource(IDR_ABOUT_DOM_DISTILLER_HTML); - source->AddResourcePath("about_dom_distiller.css", - IDR_ABOUT_DOM_DISTILLER_CSS); - source->AddResourcePath("about_dom_distiller.js", - IDR_ABOUT_DOM_DISTILLER_JS); - - source->SetUseJsonJSFormatV2(); - source->AddLocalizedString("domDistillerTitle", IDS_DOM_DISTILLER_TITLE); - content::BrowserContext* browser_context = - web_ui->GetWebContents()->GetBrowserContext(); - content::WebUIDataSource::Add(browser_context, source); - source->SetJsonPath("strings.js"); - - // Add message handler. - web_ui->AddMessageHandler(new DomDistillerHandler()); -} - -DomDistillerUI::~DomDistillerUI() {} - -} // namespace dom_distiller diff --git a/components/dom_distiller/webui/dom_distiller_ui.h b/components/dom_distiller/webui/dom_distiller_ui.h deleted file mode 100644 index 762b236..0000000 --- a/components/dom_distiller/webui/dom_distiller_ui.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 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. - -#ifndef COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_UI_H_ -#define COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_UI_H_ - -#include "content/public/browser/web_ui_controller.h" - -namespace dom_distiller { - -// The WebUI handler for chrome://dom-distiller. -class DomDistillerUI : public content::WebUIController { - public: - explicit DomDistillerUI(content::WebUI* web_ui); - virtual ~DomDistillerUI(); - - private: - DISALLOW_COPY_AND_ASSIGN(DomDistillerUI); -}; - -} // namespace dom_distiller - -#endif // COMPONENTS_DOM_DISTILLER_WEBUI_DOM_DISTILLER_UI_H_ diff --git a/components/dom_distiller/webui/resources/about_dom_distiller.css b/components/dom_distiller/webui/resources/about_dom_distiller.css deleted file mode 100644 index 088136a..0000000 --- a/components/dom_distiller/webui/resources/about_dom_distiller.css +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright 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. - */ - -a:visited { - color: orange; -} diff --git a/components/dom_distiller/webui/resources/about_dom_distiller.html b/components/dom_distiller/webui/resources/about_dom_distiller.html deleted file mode 100644 index 1e3b537..0000000 --- a/components/dom_distiller/webui/resources/about_dom_distiller.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <meta charset="utf-8"> - <title i18n-content="domDistillerTitle"></title> - <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css"> - <link rel="stylesheet" href="chrome://resources/css/overlay.css"> - <link rel="stylesheet" href="about_dom_distiller.css"> - - <script src="chrome://resources/js/cr.js"></script> - <script src="chrome://resources/js/util.js"></script> - <script src="chrome://resources/js/load_time_data.js"></script> - <script src="chrome://resources/js/cr/ui/overlay.js"></script> - <script src="about_dom_distiller.js"></script> - <script src="strings.js"></script> -</head> -<body> - <header> - <h1 i18n-content="domDistillerTitle"></h1> - </header> - <div id="entries-section"> - <div id="entries-list"></div> - </div> - <script src="chrome://resources/js/i18n_template2.js"></script> - <script src="chrome://resources/js/jstemplate_compiled.js"></script> -</body> -</html> diff --git a/components/dom_distiller/webui/resources/about_dom_distiller.js b/components/dom_distiller/webui/resources/about_dom_distiller.js deleted file mode 100644 index f558d7f..0000000 --- a/components/dom_distiller/webui/resources/about_dom_distiller.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 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. - -/** - * Callback from the backend with the list of entries to display. - * This call will build the entries section of the DOM distiller page, or hide - * that section if there are none to display. - * @param {!Array.<string>} entries The entries. - */ -function onGotEntries(entries) { - $('entries-section').hidden = !entries.length; - if (entries.length > 0) { - var list = document.createElement('ul'); - for (var i = 0; i < entries.length; i++) { - var listItem = document.createElement('li'); - var link = document.createElement('a'); - link.innerText = entries[i].title; - link.setAttribute('href', entries[i].url); - listItem.appendChild(link); - list.appendChild(listItem); - } - $('entries-list').appendChild(list); - } -} - -/* All the work we do on load. */ -function onLoadWork() { - chrome.send('requestEntries'); -} - -document.addEventListener('DOMContentLoaded', onLoadWork); diff --git a/components/dom_distiller_resources.grd b/components/dom_distiller_resources.grd deleted file mode 100644 index dd2a5f5..0000000 --- a/components/dom_distiller_resources.grd +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<grit latest_public_release="0" current_release="1"> - <outputs> - <output filename="grit/dom_distiller_resources.h" type="rc_header"> - <emit emit_type='prepend'></emit> - </output> - <output filename="dom_distiller_resources.pak" type="data_package" /> - <output filename="dom_distiller_resources.rc" type="rc_all" /> - </outputs> - <release seq="1"> - <includes> - <include name="IDR_ABOUT_DOM_DISTILLER_HTML" file="dom_distiller/webui/resources/about_dom_distiller.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> - <include name="IDR_ABOUT_DOM_DISTILLER_CSS" file="dom_distiller/webui/resources/about_dom_distiller.css" type="BINDATA" /> - <include name="IDR_ABOUT_DOM_DISTILLER_JS" file="dom_distiller/webui/resources/about_dom_distiller.js" type="BINDATA" /> - </includes> - </release> -</grit> diff --git a/components/dom_distiller_strings.grdp b/components/dom_distiller_strings.grdp deleted file mode 100644 index 3d81fae..0000000 --- a/components/dom_distiller_strings.grdp +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<grit-part> - - <message name="IDS_DOM_DISTILLER_TITLE" desc="The title to show on the DOM Distiller debug page."> - DOM Distiller - </message> - -</grit-part> diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids index f02e9ec..0e6b848 100644 --- a/tools/gritsettings/resource_ids +++ b/tools/gritsettings/resource_ids @@ -214,9 +214,6 @@ "components/component_strings.grd": { "messages": [30000], }, - "components/dom_distiller_resources.grd": { - "includes": [30250], - }, "third_party/WebKit/public/blink_resources.grd": { "includes": [30500], }, |
