| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Returns NULL if no initiator exists for |preview_dialog|. | 57 // Returns NULL if no initiator exists for |preview_dialog|. |
| 58 content::WebContents* GetInitiator(content::WebContents* preview_dialog); | 58 content::WebContents* GetInitiator(content::WebContents* preview_dialog); |
| 59 | 59 |
| 60 // Run |callback| on the dialog of each active print preview operation. | 60 // Run |callback| on the dialog of each active print preview operation. |
| 61 void ForEachPreviewDialog( | 61 void ForEachPreviewDialog( |
| 62 base::Callback<void(content::WebContents*)> callback); | 62 base::Callback<void(content::WebContents*)> callback); |
| 63 | 63 |
| 64 // content::NotificationObserver implementation. | 64 // content::NotificationObserver implementation. |
| 65 virtual void Observe(int type, | 65 virtual void Observe(int type, |
| 66 const content::NotificationSource& source, | 66 const content::NotificationSource& source, |
| 67 const content::NotificationDetails& details) OVERRIDE; | 67 const content::NotificationDetails& details) override; |
| 68 | 68 |
| 69 // Returns true if |contents| is a print preview dialog. | 69 // Returns true if |contents| is a print preview dialog. |
| 70 static bool IsPrintPreviewDialog(content::WebContents* contents); | 70 static bool IsPrintPreviewDialog(content::WebContents* contents); |
| 71 | 71 |
| 72 // Returns true if |url| is a print preview url. | 72 // Returns true if |url| is a print preview url. |
| 73 static bool IsPrintPreviewURL(const GURL& url); | 73 static bool IsPrintPreviewURL(const GURL& url); |
| 74 | 74 |
| 75 // Erase the initiator info associated with |preview_dialog|. | 75 // Erase the initiator info associated with |preview_dialog|. |
| 76 void EraseInitiatorInfo(content::WebContents* preview_dialog); | 76 void EraseInitiatorInfo(content::WebContents* preview_dialog); |
| 77 | 77 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Whether the PrintPreviewDialogController is in the middle of creating a | 132 // Whether the PrintPreviewDialogController is in the middle of creating a |
| 133 // print preview dialog. | 133 // print preview dialog. |
| 134 bool is_creating_print_preview_dialog_; | 134 bool is_creating_print_preview_dialog_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogController); | 136 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogController); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace printing | 139 } // namespace printing |
| 140 | 140 |
| 141 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ | 141 #endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DIALOG_CONTROLLER_H_ |
| OLD | NEW |