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_PRINTING_PRINT_VIEW_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_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/string16.h" | 10 #include "base/string16.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 // Manages the print commands in relation to a TabContents. TabContents | 26 // Manages the print commands in relation to a TabContents. TabContents |
| 27 // delegates a few printing related commands to this instance. | 27 // delegates a few printing related commands to this instance. |
| 28 class PrintViewManager : public NotificationObserver, | 28 class PrintViewManager : public NotificationObserver, |
| 29 public PrintedPagesSource, | 29 public PrintedPagesSource, |
| 30 public TabContentsObserver { | 30 public TabContentsObserver { |
| 31 public: | 31 public: |
| 32 explicit PrintViewManager(TabContents* tab_contents); | 32 explicit PrintViewManager(TabContents* tab_contents); |
| 33 virtual ~PrintViewManager(); | 33 virtual ~PrintViewManager(); |
| 34 | 34 |
| 35 // Override the title and url for this PrintViewManager's PrintJobs. | |
|
stuartmorgan
2011/04/01 22:34:14
The paramater is somewhat surprising given the des
Lei Zhang
2011/04/04 22:21:03
Done.
| |
| 36 void OverrideTitleAndUrl(TabContents* tab_contents); | |
| 37 | |
| 35 // PrintedPagesSource implementation. | 38 // PrintedPagesSource implementation. |
| 36 virtual string16 RenderSourceName(); | 39 virtual string16 RenderSourceName(); |
| 37 virtual GURL RenderSourceUrl(); | 40 virtual GURL RenderSourceUrl(); |
| 38 | 41 |
| 39 // NotificationObserver implementation. | 42 // NotificationObserver implementation. |
| 40 virtual void Observe(NotificationType type, | 43 virtual void Observe(NotificationType type, |
| 41 const NotificationSource& source, | 44 const NotificationSource& source, |
| 42 const NotificationDetails& details); | 45 const NotificationDetails& details); |
| 43 | 46 |
| 44 // TabContentsObserver implementation. | 47 // TabContentsObserver implementation. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 // Running an inner message loop inside RenderAllMissingPagesNow(). This means | 124 // Running an inner message loop inside RenderAllMissingPagesNow(). This means |
| 122 // we are _blocking_ until all the necessary pages have been rendered or the | 125 // we are _blocking_ until all the necessary pages have been rendered or the |
| 123 // print settings are being loaded. | 126 // print settings are being loaded. |
| 124 bool inside_inner_message_loop_; | 127 bool inside_inner_message_loop_; |
| 125 | 128 |
| 126 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 129 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 127 // Set to true when OnDidPrintPage() should be expecting the first page. | 130 // Set to true when OnDidPrintPage() should be expecting the first page. |
| 128 bool expecting_first_page_; | 131 bool expecting_first_page_; |
| 129 #endif | 132 #endif |
| 130 | 133 |
| 134 // Title and URL overrides. | |
| 135 bool overridden_title_url_; | |
|
stuartmorgan
2011/04/01 22:34:14
overridden_title_and_url_ ? I was trying to figure
| |
| 136 string16 overridden_title_; | |
| 137 GURL overridden_url_; | |
| 138 | |
| 131 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); | 139 DISALLOW_COPY_AND_ASSIGN(PrintViewManager); |
| 132 }; | 140 }; |
| 133 | 141 |
| 134 } // namespace printing | 142 } // namespace printing |
| 135 | 143 |
| 136 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ | 144 #endif // CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ |
| OLD | NEW |