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" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/browser_process_impl.h" | 16 #include "chrome/browser/browser_process_impl.h" |
17 #include "chrome/browser/debugger/devtools_window.h" | 17 #include "chrome/browser/debugger/devtools_window.h" |
18 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
20 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" | 20 #include "chrome/browser/printing/cloud_print/cloud_print_url.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/profiles/profile_manager.h" | 22 #include "chrome/browser/profiles/profile_manager.h" |
| 23 #include "chrome/browser/ui/browser.h" |
23 #include "chrome/browser/ui/browser_dialogs.h" | 24 #include "chrome/browser/ui/browser_dialogs.h" |
24 #include "chrome/browser/ui/browser.h" | |
25 #include "chrome/browser/ui/browser_finder.h" | 25 #include "chrome/browser/ui/browser_finder.h" |
26 #include "chrome/browser/ui/browser_list.h" | 26 #include "chrome/browser/ui/browser_list.h" |
27 #include "chrome/browser/ui/browser_window.h" | 27 #include "chrome/browser/ui/browser_window.h" |
28 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 28 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
30 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
31 #include "chrome/common/print_messages.h" | 31 #include "chrome/common/print_messages.h" |
32 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
33 #include "content/public/browser/browser_thread.h" | 33 #include "content/public/browser/browser_thread.h" |
34 #include "content/public/browser/navigation_controller.h" | 34 #include "content/public/browser/navigation_controller.h" |
35 #include "content/public/browser/navigation_entry.h" | 35 #include "content/public/browser/navigation_entry.h" |
36 #include "content/public/browser/notification_registrar.h" | 36 #include "content/public/browser/notification_registrar.h" |
37 #include "content/public/browser/notification_source.h" | 37 #include "content/public/browser/notification_source.h" |
38 #include "content/public/browser/notification_types.h" | 38 #include "content/public/browser/notification_types.h" |
39 #include "content/public/browser/render_view_host.h" | 39 #include "content/public/browser/render_view_host.h" |
40 #include "content/public/browser/web_contents.h" | 40 #include "content/public/browser/web_contents.h" |
41 #include "content/public/browser/web_contents_view.h" | 41 #include "content/public/browser/web_contents_view.h" |
42 #include "content/public/browser/web_ui.h" | 42 #include "content/public/browser/web_ui.h" |
| 43 #include "grit/generated_resources.h" |
43 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
| 45 #include "webkit/glue/webpreferences.h" |
44 | 46 |
45 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
46 #include "ui/base/win/foreground_helper.h" | 48 #include "ui/base/win/foreground_helper.h" |
47 #endif | 49 #endif |
48 | 50 |
49 #include "webkit/glue/webpreferences.h" | |
50 | |
51 #include "grit/generated_resources.h" | |
52 | |
53 #if defined(USE_AURA) | |
54 #include "chrome/browser/ui/browser_window.h" | |
55 #include "chrome/browser/ui/views/web_dialog_view.h" | |
56 #include "ui/aura/root_window.h" | |
57 #include "ui/views/widget/widget.h" | |
58 #endif | |
59 | |
60 // This module implements the UI support in Chrome for cloud printing. | 51 // This module implements the UI support in Chrome for cloud printing. |
61 // This means hosting a dialog containing HTML/JavaScript and using | 52 // This means hosting a dialog containing HTML/JavaScript and using |
62 // the published cloud print user interface integration APIs to get | 53 // the published cloud print user interface integration APIs to get |
63 // page setup settings from the dialog contents and provide the | 54 // page setup settings from the dialog contents and provide the |
64 // generated print data to the dialog contents for uploading to the | 55 // generated print data to the dialog contents for uploading to the |
65 // cloud print service. | 56 // cloud print service. |
66 | 57 |
67 // Currently, the flow between these classes is as follows: | 58 // Currently, the flow between these classes is as follows: |
68 | 59 |
69 // PrintDialogCloud::CreatePrintDialogForFile is called from | 60 // PrintDialogCloud::CreatePrintDialogForFile is called from |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 file_type, | 793 file_type, |
803 false, | 794 false, |
804 delete_on_close); | 795 delete_on_close); |
805 return true; | 796 return true; |
806 } | 797 } |
807 } | 798 } |
808 return false; | 799 return false; |
809 } | 800 } |
810 | 801 |
811 } // end namespace | 802 } // end namespace |
OLD | NEW |