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

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

Issue 6783005: Print Preview: Set a print job's title and url correctly. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: tab helpers stay with friends Created 9 years, 8 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_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
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 for this PrintViewManager's PrintJobs using the title
36 // in |tab_contents|.
37 void OverrideTitle(TabContents* tab_contents);
38
35 // PrintedPagesSource implementation. 39 // PrintedPagesSource implementation.
36 virtual string16 RenderSourceName(); 40 virtual string16 RenderSourceName();
37 virtual GURL RenderSourceUrl(); 41 virtual GURL RenderSourceUrl();
38 42
39 // NotificationObserver implementation. 43 // NotificationObserver implementation.
40 virtual void Observe(NotificationType type, 44 virtual void Observe(NotificationType type,
41 const NotificationSource& source, 45 const NotificationSource& source,
42 const NotificationDetails& details); 46 const NotificationDetails& details);
43 47
44 // TabContentsObserver implementation. 48 // TabContentsObserver implementation.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Running an inner message loop inside RenderAllMissingPagesNow(). This means 125 // Running an inner message loop inside RenderAllMissingPagesNow(). This means
122 // we are _blocking_ until all the necessary pages have been rendered or the 126 // we are _blocking_ until all the necessary pages have been rendered or the
123 // print settings are being loaded. 127 // print settings are being loaded.
124 bool inside_inner_message_loop_; 128 bool inside_inner_message_loop_;
125 129
126 #if defined(OS_POSIX) && !defined(OS_MACOSX) 130 #if defined(OS_POSIX) && !defined(OS_MACOSX)
127 // Set to true when OnDidPrintPage() should be expecting the first page. 131 // Set to true when OnDidPrintPage() should be expecting the first page.
128 bool expecting_first_page_; 132 bool expecting_first_page_;
129 #endif 133 #endif
130 134
135 // Title override.
136 bool is_title_overridden_;
137 string16 overridden_title_;
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_
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_preview_message_handler.cc ('k') | chrome/browser/printing/print_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698