| 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/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // down and released. | 101 // down and released. |
| 102 | 102 |
| 103 // TODO(scottbyer): | 103 // TODO(scottbyer): |
| 104 // http://code.google.com/p/chromium/issues/detail?id=44093 The | 104 // http://code.google.com/p/chromium/issues/detail?id=44093 The |
| 105 // high-level flow (where the data is generated before even | 105 // high-level flow (where the data is generated before even |
| 106 // bringing up the dialog) isn't what we want. | 106 // bringing up the dialog) isn't what we want. |
| 107 | 107 |
| 108 using content::BrowserThread; | 108 using content::BrowserThread; |
| 109 using content::NavigationEntry; | 109 using content::NavigationEntry; |
| 110 using content::WebContents; | 110 using content::WebContents; |
| 111 using content::WebUIMessageHandler; |
| 111 | 112 |
| 112 namespace internal_cloud_print_helpers { | 113 namespace internal_cloud_print_helpers { |
| 113 | 114 |
| 114 // From the JSON parsed value, get the entries for the page setup | 115 // From the JSON parsed value, get the entries for the page setup |
| 115 // parameters. | 116 // parameters. |
| 116 bool GetPageSetupParameters(const std::string& json, | 117 bool GetPageSetupParameters(const std::string& json, |
| 117 PrintMsg_Print_Params& parameters) { | 118 PrintMsg_Print_Params& parameters) { |
| 118 scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false)); | 119 scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false)); |
| 119 DLOG_IF(ERROR, (!parsed_value.get() || | 120 DLOG_IF(ERROR, (!parsed_value.get() || |
| 120 !parsed_value->IsType(Value::TYPE_DICTIONARY))) | 121 !parsed_value->IsType(Value::TYPE_DICTIONARY))) |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 file_type, | 724 file_type, |
| 724 false, | 725 false, |
| 725 delete_on_close); | 726 delete_on_close); |
| 726 return true; | 727 return true; |
| 727 } | 728 } |
| 728 } | 729 } |
| 729 return false; | 730 return false; |
| 730 } | 731 } |
| 731 | 732 |
| 732 } // end namespace | 733 } // end namespace |
| OLD | NEW |