blob: 413cb0d6c5a81179380c9ac1dd3cd9af1a776aa7 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright (c) 2010 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/dom_ui/keyboard_ui.h"
#include "base/ref_counted_memory.h"
#include "base/singleton.h"
#include "base/string_piece.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/common/url_constants.h"
#include "grit/browser_resources.h"
#include "ui/base/resource/resource_bundle.h"
///////////////////////////////////////////////////////////////////////////////
// KeyboardUI
KeyboardUI::KeyboardUI(TabContents* contents)
: DOMUI(contents) {
KeyboardHTMLSource* html_source = new KeyboardHTMLSource();
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
NewRunnableMethod(
ChromeURLDataManager::GetInstance(),
&ChromeURLDataManager::AddDataSource,
make_scoped_refptr(html_source)));
}
KeyboardUI::~KeyboardUI() {
}
///////////////////////////////////////////////////////////////////////////////
// KeyboardHTMLSource
KeyboardUI::KeyboardHTMLSource::KeyboardHTMLSource()
: DataSource(chrome::kChromeUIKeyboardHost, MessageLoop::current()) {
}
void KeyboardUI::KeyboardHTMLSource::StartDataRequest(const std::string& path,
bool is_off_the_record,
int request_id) {
NOTREACHED() << "We should never get here since the extension should have"
<< "been triggered";
SendResponse(request_id, NULL);
}
std::string KeyboardUI::KeyboardHTMLSource::GetMimeType(
const std::string&) const {
NOTREACHED() << "We should never get here since the extension should have"
<< "been triggered";
return "text/html";
}
|