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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // renderer host that print data generation into the renderer host provided | 68 // renderer host that print data generation into the renderer host provided |
69 // temp file has been completed. That call is on the FILE thread. | 69 // temp file has been completed. That call is on the FILE thread. |
70 // That, in turn, hops over to the UI thread to create an instance of | 70 // That, in turn, hops over to the UI thread to create an instance of |
71 // PrintDialogCloud. | 71 // PrintDialogCloud. |
72 | 72 |
73 // The constructor for PrintDialogCloud creates a | 73 // The constructor for PrintDialogCloud creates a |
74 // CloudPrintWebDialogDelegate and asks the current active browser to | 74 // CloudPrintWebDialogDelegate and asks the current active browser to |
75 // show an HTML dialog using that class as the delegate. That class | 75 // show an HTML dialog using that class as the delegate. That class |
76 // hands in the kChromeUICloudPrintResourcesURL as the URL to visit. That is | 76 // hands in the kChromeUICloudPrintResourcesURL as the URL to visit. That is |
77 // recognized by the GetWebUIFactoryFunction as a signal to create an | 77 // recognized by the GetWebUIFactoryFunction as a signal to create an |
78 // ExternalHtmlDialogUI. | 78 // ExternalWebDialogUI. |
79 | 79 |
80 // CloudPrintWebDialogDelegate also temporarily owns a | 80 // CloudPrintWebDialogDelegate also temporarily owns a |
81 // CloudPrintFlowHandler, a class which is responsible for the actual | 81 // CloudPrintFlowHandler, a class which is responsible for the actual |
82 // interactions with the dialog contents, including handing in the | 82 // interactions with the dialog contents, including handing in the |
83 // print data and getting any page setup parameters that the dialog | 83 // print data and getting any page setup parameters that the dialog |
84 // contents provides. As part of bringing up the dialog, | 84 // contents provides. As part of bringing up the dialog, |
85 // HtmlDialogUI::RenderViewCreated is called (an override of | 85 // WebDialogUI::RenderViewCreated is called (an override of |
86 // WebUI::RenderViewCreated). That routine, in turn, calls the | 86 // WebUI::RenderViewCreated). That routine, in turn, calls the |
87 // delegate's GetWebUIMessageHandlers routine, at which point the | 87 // delegate's GetWebUIMessageHandlers routine, at which point the |
88 // ownership of the CloudPrintFlowHandler is handed over. A pointer | 88 // ownership of the CloudPrintFlowHandler is handed over. A pointer |
89 // to the flow handler is kept to facilitate communication back and | 89 // to the flow handler is kept to facilitate communication back and |
90 // forth between the two classes. | 90 // forth between the two classes. |
91 | 91 |
92 // The WebUI continues dialog bring-up, calling | 92 // The WebUI continues dialog bring-up, calling |
93 // CloudPrintFlowHandler::RegisterMessages. This is where the | 93 // CloudPrintFlowHandler::RegisterMessages. This is where the |
94 // additional object model capabilities are registered for the dialog | 94 // additional object model capabilities are registered for the dialog |
95 // contents to use. It is also at this time that capabilities for the | 95 // contents to use. It is also at this time that capabilities for the |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 file_type, | 799 file_type, |
800 false, | 800 false, |
801 delete_on_close); | 801 delete_on_close); |
802 return true; | 802 return true; |
803 } | 803 } |
804 } | 804 } |
805 return false; | 805 return false; |
806 } | 806 } |
807 | 807 |
808 } // end namespace | 808 } // end namespace |
OLD | NEW |