blob: 4e6c4e1018db3a004deb902a06041a7abb141583 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (c) 2011 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/input_window_dialog_ui.h"
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/common/url_constants.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
using content::WebContents;
InputWindowDialogUI::InputWindowDialogUI(WebContents* contents)
: HtmlDialogUI(contents) {
ChromeWebUIDataSource* source =
new ChromeWebUIDataSource(chrome::kChromeUIInputWindowDialogHost);
source->AddLocalizedString("ok", IDS_OK);
source->AddLocalizedString("cancel", IDS_CANCEL);
// Set the json path.
source->set_json_path("strings.js");
// Set default resource.
source->set_default_resource(IDR_INPUT_WINDOW_DIALOG_HTML);
Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
profile->GetChromeURLDataManager()->AddDataSource(source);
}
InputWindowDialogUI::~InputWindowDialogUI() {
}
|