Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 PrintPreviewHandler(); | 25 PrintPreviewHandler(); |
| 26 virtual ~PrintPreviewHandler(); | 26 virtual ~PrintPreviewHandler(); |
| 27 | 27 |
| 28 // WebUIMessageHandler implementation. | 28 // WebUIMessageHandler implementation. |
| 29 virtual void RegisterMessages(); | 29 virtual void RegisterMessages(); |
| 30 | 30 |
| 31 // SelectFileDialog::Listener implementation. | 31 // SelectFileDialog::Listener implementation. |
| 32 virtual void FileSelected(const FilePath& path, int index, void* params); | 32 virtual void FileSelected(const FilePath& path, int index, void* params); |
| 33 | 33 |
| 34 // Displays a modal dialog, prompting the user to select a file. | 34 // Displays a modal dialog, prompting the user to select a file. |
| 35 void SelectFile(); | 35 void SelectFile(const FilePath& default_filename); |
|
Lei Zhang
2011/04/01 01:05:35
nit: default_path.
dpapad
2011/04/01 02:32:15
Done.
| |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 friend class EnumeratePrintersTaskProxy; | 38 friend class EnumeratePrintersTaskProxy; |
| 39 | 39 |
| 40 // Get the list of printers. |args| is unused. | 40 // Get the list of printers. |args| is unused. |
| 41 void HandleGetPrinters(const ListValue* args); | 41 void HandleGetPrinters(const ListValue* args); |
| 42 | 42 |
| 43 // Ask the initiator renderer to generate a preview. | 43 // Ask the initiator renderer to generate a preview. |
| 44 // First element of |args| is a job settings JSON string. | 44 // First element of |args| is a job settings JSON string. |
| 45 void HandleGetPreview(const ListValue* args); | 45 void HandleGetPreview(const ListValue* args); |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 69 // Set to true if the preview should be landscape. | 69 // Set to true if the preview should be landscape. |
| 70 bool landscape_; | 70 bool landscape_; |
| 71 | 71 |
| 72 // The underlying dialog object. | 72 // The underlying dialog object. |
| 73 scoped_refptr<SelectFileDialog> select_file_dialog_; | 73 scoped_refptr<SelectFileDialog> select_file_dialog_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 75 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 78 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |