summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-03 12:13:48 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-03 12:13:48 +0000
commita21767477fef894a75d0b13a8da3da6cdc2f5e3e (patch)
treee45f5c969518b6a64ed54fc8d96ba28f4736aae7 /chrome/browser/dom_ui
parent13c68582fc7a22a18cde190d09393912124f75b0 (diff)
downloadchromium_src-a21767477fef894a75d0b13a8da3da6cdc2f5e3e.zip
chromium_src-a21767477fef894a75d0b13a8da3da6cdc2f5e3e.tar.gz
chromium_src-a21767477fef894a75d0b13a8da3da6cdc2f5e3e.tar.bz2
Foundations for Print Preview and Setup
Create the foundations of implementing a tab for printing should be in the form of: print:http://www.google.com I have followed similar approach as what has been done with view-source: and chrome-extension: BUG=173, 947 TEST=none Review URL: http://codereview.chromium.org/150207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/dom_ui_factory.cc7
-rw-r--r--chrome/browser/dom_ui/print_ui.cc15
-rw-r--r--chrome/browser/dom_ui/print_ui.h18
3 files changed, 40 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc
index 8827c02..8ff6d03 100644
--- a/chrome/browser/dom_ui/dom_ui_factory.cc
+++ b/chrome/browser/dom_ui/dom_ui_factory.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/dom_ui/history_ui.h"
#include "chrome/browser/dom_ui/html_dialog_ui.h"
#include "chrome/browser/dom_ui/new_tab_ui.h"
+#include "chrome/browser/dom_ui/print_ui.h"
#include "chrome/browser/extensions/extensions_ui.h"
#include "chrome/browser/extensions/extension_dom_ui.h"
#include "chrome/common/url_constants.h"
@@ -41,6 +42,12 @@ static bool CreateDOMUI(const GURL& url, TabContents* tab_contents,
return true;
}
+ if (url.SchemeIs(chrome::kPrintScheme)) {
+ if (new_ui)
+ *new_ui = new PrintUI(tab_contents);
+ return true;
+ }
+
#ifdef CHROME_PERSONALIZATION
if (Personalization::NeedsDOMUI(url)) {
if (new_ui)
diff --git a/chrome/browser/dom_ui/print_ui.cc b/chrome/browser/dom_ui/print_ui.cc
new file mode 100644
index 0000000..973e5c7
--- /dev/null
+++ b/chrome/browser/dom_ui/print_ui.cc
@@ -0,0 +1,15 @@
+// Copyright (c) 2009 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/print_ui.h"
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// PrintUI
+//
+///////////////////////////////////////////////////////////////////////////////
+
+PrintUI::PrintUI(TabContents* contents) : DOMUI(contents) {
+ NOTIMPLEMENTED();
+}
diff --git a/chrome/browser/dom_ui/print_ui.h b/chrome/browser/dom_ui/print_ui.h
new file mode 100644
index 0000000..020b3f1
--- /dev/null
+++ b/chrome/browser/dom_ui/print_ui.h
@@ -0,0 +1,18 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_BROWSER_DOM_UI_PRINT_UI_H_
+#define CHROME_BROWSER_DOM_UI_PRINT_UI_H_
+
+#include "chrome/browser/dom_ui/dom_ui.h"
+
+class PrintUI : public DOMUI {
+ public:
+ explicit PrintUI(TabContents* contents);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PrintUI);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_PRINT_UI_H_