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

Side by Side 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: Breaking the CL to be only the moved files. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/predictors/autocomplete_action_predictor_ui.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
9 #include "chrome/browser/ui/webui/predictors/autocomplete_action_predictor_dom_h andler.h"
10 #include "chrome/common/url_constants.h"
11 #include "content/public/browser/web_contents.h"
12 #include "content/public/browser/web_ui.h"
13 #include "grit/browser_resources.h"
14
15 namespace {
16
17 ChromeWebUIDataSource* CreateAutocompleteActionPredictorUIHTMLSource() {
18 ChromeWebUIDataSource* source =
19 new ChromeWebUIDataSource(chrome::kChromeUIPredictorsHost);
20 source->add_resource_path("autocomplete_action_predictor.js",
21 IDR_AUTOCOMPLETE_ACTION_PREDICTOR_JS);
22 source->set_default_resource(IDR_AUTOCOMPLETE_ACTION_PREDICTOR_HTML);
23 return source;
24 }
25
26 } // namespace
27
28 AutocompleteActionPredictorUI::AutocompleteActionPredictorUI(
29 content::WebUI* web_ui) : WebUIController(web_ui) {
30 Profile* profile = Profile::FromWebUI(web_ui);
31 web_ui->AddMessageHandler(new AutocompleteActionPredictorDOMHandler(
32 profile));
33 profile->GetChromeURLDataManager()->AddDataSource(
34 CreateAutocompleteActionPredictorUIHTMLSource());
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698