| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_DOM_UI_PRINT_UI_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_PRINT_UI_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_PRINT_UI_H_ | 6 #define CHROME_BROWSER_DOM_UI_PRINT_UI_H_ |
| 7 | 7 |
| 8 #include <string> |
| 9 |
| 10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 8 #include "chrome/browser/dom_ui/dom_ui.h" | 11 #include "chrome/browser/dom_ui/dom_ui.h" |
| 9 | 12 |
| 13 // The TabContents used for the print page. |
| 10 class PrintUI : public DOMUI { | 14 class PrintUI : public DOMUI { |
| 11 public: | 15 public: |
| 12 explicit PrintUI(TabContents* contents); | 16 explicit PrintUI(TabContents* contents); |
| 13 | 17 |
| 14 private: | 18 private: |
| 15 DISALLOW_COPY_AND_ASSIGN(PrintUI); | 19 DISALLOW_COPY_AND_ASSIGN(PrintUI); |
| 16 }; | 20 }; |
| 17 | 21 |
| 22 // To serve dynamic print data off of chrome. |
| 23 class PrintUIHTMLSource : public ChromeURLDataManager::DataSource { |
| 24 public: |
| 25 PrintUIHTMLSource(); |
| 26 |
| 27 // ChromeURLDataManager overrides. |
| 28 virtual void StartDataRequest(const std::string& path, int request_id); |
| 29 virtual std::string GetMimeType(const std::string&) const { |
| 30 return "text/html"; |
| 31 } |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(PrintUIHTMLSource); |
| 35 }; |
| 36 |
| 18 #endif // CHROME_BROWSER_DOM_UI_PRINT_UI_H_ | 37 #endif // CHROME_BROWSER_DOM_UI_PRINT_UI_H_ |
| OLD | NEW |