Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6853)

Unified Diff: chrome/browser/ui/webui/print_preview_data_source.h

Issue 7063030: PrintPreview: Print Preview is not staying associated with initiator renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview_data_source.h
diff --git a/chrome/browser/ui/webui/print_preview_data_source.h b/chrome/browser/ui/webui/print_preview_data_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..078579f282a400298cbc2b5b2be7d83f77655d6d
--- /dev/null
+++ b/chrome/browser/ui/webui/print_preview_data_source.h
@@ -0,0 +1,45 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_DATA_SOURCE_H_
+#define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_DATA_SOURCE_H_
+#pragma once
+
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+
+class Profile;
+
+// PrintPreviewDataSource serves data for chrome://print requests.
+//
+// The format for requesting data is as follows:
+// chrome://print/print.pdf/<PrintPreviewUIAddrStr>
+//
+// Parameters (< > required):
+// <PrintPreviewUIAddrStr> = Print preview UI identifier.
+//
+// Example:
+// chrome://print/print.pdf/ab0123ef
+
+class PrintPreviewDataSource : public ChromeURLDataManager::DataSource {
+ public:
+ explicit PrintPreviewDataSource(Profile* profile);
+
+ // ChromeURLDataManager::DataSource implementation.
+ virtual void StartDataRequest(const std::string& path,
+ bool is_incognito,
+ int request_id) OVERRIDE;
+ virtual std::string GetMimeType(const std::string& path) const OVERRIDE;
+
+ private:
+ virtual ~PrintPreviewDataSource();
+
+ Profile* profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrintPreviewDataSource);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_DATA_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698