Chromium Code Reviews| Index: chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc |
| diff --git a/chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc b/chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f7ab4a14d5896cc06eebe059e2c94cabcf547549 |
| --- /dev/null |
| +++ b/chrome/browser/ui/webui/local_omnibox_popup/local_omnibox_popup_ui.cc |
| @@ -0,0 +1,34 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
dhollowa
2012/12/13 01:20:15
nit: no (c)
Shishir
2012/12/13 22:57:58
Done.
|
| +// 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/local_omnibox_popup/local_omnibox_popup_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/local_omnibox_popup/local_omnibox_popup_handler.h" |
| +#include "chrome/common/url_constants.h" |
| +#include "content/public/browser/web_ui.h" |
| +#include "content/public/browser/web_ui_controller.h" |
| +#include "grit/browser_resources.h" |
| + |
| + |
| +LocalOmniboxPopupUI::LocalOmniboxPopupUI(content::WebUI* web_ui) |
| + : content::WebUIController(web_ui) { |
| + ChromeWebUIDataSource* html_source = |
| + new ChromeWebUIDataSource(chrome::kChromeUILocalOmniboxPopupHost); |
| + html_source->add_resource_path("local_omnibox_popup.css", |
| + IDR_LOCAL_OMNIBOX_POPUP_CSS); |
| + html_source->add_resource_path("local_omnibox_popup.js", |
| + IDR_LOCAL_OMNIBOX_POPUP_JS); |
| + html_source->set_default_resource(IDR_LOCAL_OMNIBOX_POPUP_HTML); |
| + |
| + Profile* profile = Profile::FromWebUI(web_ui); |
| + ChromeURLDataManager::AddDataSource(profile, html_source); |
| + |
| + web_ui->AddMessageHandler(new LocalOmniboxPopupHandler(profile)); |
| +} |
| + |
| +LocalOmniboxPopupUI::~LocalOmniboxPopupUI() { |
| +} |