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

Unified Diff: chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.cc

Issue 9610006: Refactoring, moving and renaming the NetworkActionPredictor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resolved sync conflicts. Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.cc
diff --git a/chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.cc b/chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..65b05fd5295159518eefb74a406dbb0b0dcd11f2
--- /dev/null
+++ b/chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 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 "chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
+#include "chrome/browser/ui/webui/predictors/autocomplete_action_predictor_dom_handler.h"
+#include "chrome/common/url_constants.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_ui.h"
+#include "grit/browser_resources.h"
+
+namespace {
+
+ChromeWebUIDataSource* CreateAutocompleteActionPredictorUIHTMLSource() {
+ ChromeWebUIDataSource* source =
+ new ChromeWebUIDataSource(chrome::kChromeUIPredictorsHost);
+ source->add_resource_path("autocomplete_action_predictor.js",
+ IDR_AUTOCOMPLETE_ACTION_PREDICTOR_JS);
+ source->set_default_resource(IDR_AUTOCOMPLETE_ACTION_PREDICTOR_HTML);
+ return source;
+}
+
+} // namespace
+
+AutocompleteActionPredictorUI::AutocompleteActionPredictorUI(
+ content::WebUI* web_ui) : WebUIController(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ web_ui->AddMessageHandler(new AutocompleteActionPredictorDOMHandler(profile));
+ ChromeURLDataManager::AddDataSource(profile,
+ CreateAutocompleteActionPredictorUIHTMLSource());
+}
« no previous file with comments | « chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698