summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/remoting_ui.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 10:56:31 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-18 10:56:31 +0000
commit229688ddef58126e746dcb26b9cb8dbf55ae3586 (patch)
tree15e63b708d9bca394c97757ac865e0a5c2f87f10 /chrome/browser/dom_ui/remoting_ui.cc
parent4f57fd3756fd5774c85670f40a8805d39af757e2 (diff)
downloadchromium_src-229688ddef58126e746dcb26b9cb8dbf55ae3586.zip
chromium_src-229688ddef58126e746dcb26b9cb8dbf55ae3586.tar.gz
chromium_src-229688ddef58126e746dcb26b9cb8dbf55ae3586.tar.bz2
WebUI: Move more files from chrome/browser/dom_ui to chrome/browser/webui. Part 4.
BUG=59945, 59946 TEST=trybots Review URL: http://codereview.chromium.org/6532045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/remoting_ui.cc')
-rw-r--r--chrome/browser/dom_ui/remoting_ui.cc83
1 files changed, 0 insertions, 83 deletions
diff --git a/chrome/browser/dom_ui/remoting_ui.cc b/chrome/browser/dom_ui/remoting_ui.cc
deleted file mode 100644
index e849bb0..0000000
--- a/chrome/browser/dom_ui/remoting_ui.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-// 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/dom_ui/remoting_ui.h"
-
-#include "base/singleton.h"
-#include "chrome/browser/browser_thread.h"
-#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/common/url_constants.h"
-#include "grit/theme_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-
-namespace {
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// RemotingHTMLSource
-//
-///////////////////////////////////////////////////////////////////////////////
-
-class RemotingUIHTMLSource : public ChromeURLDataManager::DataSource {
- public:
- RemotingUIHTMLSource()
- : DataSource(chrome::kChromeUIRemotingHost, MessageLoop::current()) {}
-
- // Called when the network layer has requested a resource underneath
- // the path we registered.
- virtual void StartDataRequest(const std::string& path,
- bool is_off_the_record,
- int request_id);
- virtual std::string GetMimeType(const std::string&) const {
- return "pepper-application/x-chromoting";
- }
-
- private:
- ~RemotingUIHTMLSource() {}
-
- DISALLOW_COPY_AND_ASSIGN(RemotingUIHTMLSource);
-};
-
-void RemotingUIHTMLSource::StartDataRequest(const std::string& path,
- bool is_off_the_record,
- int request_id) {
- // Dummy data. Not used, but we need to send something back in the response.
- std::string full_html = "remoting";
-
- scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes());
- html_bytes->data.resize(full_html.size());
- std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin());
-
- SendResponse(request_id, html_bytes);
-}
-
-} // namespace
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// RemotingUI
-//
-///////////////////////////////////////////////////////////////////////////////
-
-RemotingUI::RemotingUI(TabContents* contents) : WebUI(contents) {
- RemotingUIHTMLSource* html_source = new RemotingUIHTMLSource();
-
- // Set up the chrome://remoting source.
- contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
-}
-
-
-// static
-RefCountedMemory* RemotingUI::GetFaviconResourceBytes() {
- return ResourceBundle::GetSharedInstance().
- // TODO(garykac): Have custom remoting icon created.
- LoadDataResourceBytes(IDR_PLUGIN);
-}
-
-// static
-void RemotingUI::RegisterUserPrefs(PrefService* prefs) {
- // TODO(garykac): Add remoting prefs (if needed).
-}