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

Side by Side Diff: chrome/browser/printing/print_preview_data_service.h

Issue 7647010: Print preview page selection should not require a rerendering of draft pages. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed comment Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_ 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_
6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_ 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 22 matching lines...) Expand all
33 // or |printing::COMPLETE_PREVIEW_DOCUMENT_INDEX| to represent complete 33 // or |printing::COMPLETE_PREVIEW_DOCUMENT_INDEX| to represent complete
34 // preview data. Use |index| to set/update a specific preview page data. 34 // preview data. Use |index| to set/update a specific preview page data.
35 // NOTE: PrintPreviewDataStore owns the data. Do not refcount |data| before 35 // NOTE: PrintPreviewDataStore owns the data. Do not refcount |data| before
36 // calling this function. It will be refcounted in PrintPreviewDataStore. 36 // calling this function. It will be refcounted in PrintPreviewDataStore.
37 void SetDataEntry(const std::string& preview_ui_addr_str, int index, 37 void SetDataEntry(const std::string& preview_ui_addr_str, int index,
38 const RefCountedBytes* data); 38 const RefCountedBytes* data);
39 39
40 // Remove the corresponding PrintPreviewUI entry from the map. 40 // Remove the corresponding PrintPreviewUI entry from the map.
41 void RemoveEntry(const std::string& preview_ui_addr_str); 41 void RemoveEntry(const std::string& preview_ui_addr_str);
42 42
43 // Returns the available draft page count.
44 int GetAvailableDraftPageCount(const std::string& preview_ui_addr_str);
45
43 private: 46 private:
44 friend struct DefaultSingletonTraits<PrintPreviewDataService>; 47 friend struct DefaultSingletonTraits<PrintPreviewDataService>;
45 48
46 // 1:1 relationship between PrintPreviewUI and data store object. 49 // 1:1 relationship between PrintPreviewUI and data store object.
47 // Key: Print preview UI address string. 50 // Key: Print preview UI address string.
48 // Value: Print preview data store object. 51 // Value: Print preview data store object.
49 typedef std::map<std::string, scoped_refptr<PrintPreviewDataStore> > 52 typedef std::map<std::string, scoped_refptr<PrintPreviewDataStore> >
50 PreviewDataStoreMap; 53 PreviewDataStoreMap;
51 54
52 PrintPreviewDataService(); 55 PrintPreviewDataService();
53 virtual ~PrintPreviewDataService(); 56 virtual ~PrintPreviewDataService();
54 57
55 PreviewDataStoreMap data_store_map_; 58 PreviewDataStoreMap data_store_map_;
56 59
57 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDataService); 60 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDataService);
58 }; 61 };
59 62
60 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_ 63 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/printing/print_preview_data_service.cc » ('j') | chrome/renderer/print_web_view_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698