| 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 #include "chrome/browser/printing/print_dialog_cloud.h" | 5 #include "chrome/browser/printing/print_dialog_cloud.h" |
| 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" | 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" |
| 7 | 7 |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // http://code.google.com/p/chromium/issues/detail?id=44093 The | 105 // http://code.google.com/p/chromium/issues/detail?id=44093 The |
| 106 // high-level flow (where the data is generated before even | 106 // high-level flow (where the data is generated before even |
| 107 // bringing up the dialog) isn't what we want. | 107 // bringing up the dialog) isn't what we want. |
| 108 | 108 |
| 109 using content::BrowserThread; | 109 using content::BrowserThread; |
| 110 using content::NavigationController; | 110 using content::NavigationController; |
| 111 using content::NavigationEntry; | 111 using content::NavigationEntry; |
| 112 using content::RenderViewHost; | 112 using content::RenderViewHost; |
| 113 using content::WebContents; | 113 using content::WebContents; |
| 114 using content::WebUIMessageHandler; | 114 using content::WebUIMessageHandler; |
| 115 using ui::WebDialogDelegate; |
| 115 | 116 |
| 116 namespace internal_cloud_print_helpers { | 117 namespace internal_cloud_print_helpers { |
| 117 | 118 |
| 118 // From the JSON parsed value, get the entries for the page setup | 119 // From the JSON parsed value, get the entries for the page setup |
| 119 // parameters. | 120 // parameters. |
| 120 bool GetPageSetupParameters(const std::string& json, | 121 bool GetPageSetupParameters(const std::string& json, |
| 121 PrintMsg_Print_Params& parameters) { | 122 PrintMsg_Print_Params& parameters) { |
| 122 scoped_ptr<Value> parsed_value(base::JSONReader::Read(json)); | 123 scoped_ptr<Value> parsed_value(base::JSONReader::Read(json)); |
| 123 DLOG_IF(ERROR, (!parsed_value.get() || | 124 DLOG_IF(ERROR, (!parsed_value.get() || |
| 124 !parsed_value->IsType(Value::TYPE_DICTIONARY))) | 125 !parsed_value->IsType(Value::TYPE_DICTIONARY))) |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 print_job_print_ticket, | 807 print_job_print_ticket, |
| 807 file_type, | 808 file_type, |
| 808 delete_on_close); | 809 delete_on_close); |
| 809 return true; | 810 return true; |
| 810 } | 811 } |
| 811 } | 812 } |
| 812 return false; | 813 return false; |
| 813 } | 814 } |
| 814 | 815 |
| 815 } // end namespace | 816 } // end namespace |
| OLD | NEW |