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 #include "chrome/browser/ui/webui/print_preview_ui.h" | 5 #include "chrome/browser/ui/webui/print_preview_ui.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/webui/print_preview_handler.h" | 9 #include "chrome/browser/ui/webui/print_preview_handler.h" |
10 #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" | 10 #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 void PrintPreviewUI::OnInitiatorTabClosed( | 32 void PrintPreviewUI::OnInitiatorTabClosed( |
33 const std::string& initiator_url) { | 33 const std::string& initiator_url) { |
34 StringValue initiator_tab_url(initiator_url); | 34 StringValue initiator_tab_url(initiator_url); |
35 CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url); | 35 CallJavascriptFunction("onInitiatorTabClosed", initiator_tab_url); |
36 } | 36 } |
37 | 37 |
38 void PrintPreviewUI::OnPreviewDataIsAvailable(int expected_pages_count, | 38 void PrintPreviewUI::OnPreviewDataIsAvailable(int expected_pages_count, |
39 const string16& job_title, | 39 const string16& job_title, |
40 bool modifiable) { | 40 bool modifiable) { |
| 41 VLOG(1) << "Print preview request finished with " |
| 42 << expected_pages_count << " pages"; |
41 FundamentalValue pages_count(expected_pages_count); | 43 FundamentalValue pages_count(expected_pages_count); |
42 StringValue title(job_title); | 44 StringValue title(job_title); |
43 FundamentalValue is_preview_modifiable(modifiable); | 45 FundamentalValue is_preview_modifiable(modifiable); |
44 CallJavascriptFunction("updatePrintPreview", pages_count, title, | 46 CallJavascriptFunction("updatePrintPreview", pages_count, title, |
45 is_preview_modifiable); | 47 is_preview_modifiable); |
46 } | 48 } |
OLD | NEW |