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 | 6 |
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 23 matching lines...) Expand all Loading... |
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_observer.h" | 41 #include "content/public/browser/web_contents_observer.h" |
42 #include "content/public/browser/web_ui.h" | 42 #include "content/public/browser/web_ui.h" |
43 #include "content/public/common/frame_navigate_params.h" | 43 #include "content/public/common/frame_navigate_params.h" |
44 #include "webkit/common/webpreferences.h" | 44 #include "content/public/common/web_preferences.h" |
45 | 45 |
46 #if defined(USE_AURA) | 46 #if defined(USE_AURA) |
47 #include "ui/aura/window.h" | 47 #include "ui/aura/window.h" |
48 #include "ui/aura/window_tree_host.h" | 48 #include "ui/aura/window_tree_host.h" |
49 #endif | 49 #endif |
50 | 50 |
51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
52 #include "ui/base/win/foreground_helper.h" | 52 #include "ui/base/win/foreground_helper.h" |
53 #endif | 53 #endif |
54 | 54 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // When the dialog contents are finished (by either being cancelled or | 108 // When the dialog contents are finished (by either being cancelled or |
109 // hitting the print button), the delegate is notified, and responds | 109 // hitting the print button), the delegate is notified, and responds |
110 // that the dialog should be closed, at which point things are torn | 110 // that the dialog should be closed, at which point things are torn |
111 // down and released. | 111 // down and released. |
112 | 112 |
113 using content::BrowserThread; | 113 using content::BrowserThread; |
114 using content::NavigationController; | 114 using content::NavigationController; |
115 using content::NavigationEntry; | 115 using content::NavigationEntry; |
116 using content::RenderViewHost; | 116 using content::RenderViewHost; |
117 using content::WebContents; | 117 using content::WebContents; |
| 118 using content::WebPreferences; |
118 using content::WebUIMessageHandler; | 119 using content::WebUIMessageHandler; |
119 using ui::WebDialogDelegate; | 120 using ui::WebDialogDelegate; |
120 | 121 |
121 namespace { | 122 namespace { |
122 | 123 |
123 const int kDefaultWidth = 912; | 124 const int kDefaultWidth = 912; |
124 const int kDefaultHeight = 633; | 125 const int kDefaultHeight = 633; |
125 | 126 |
126 bool IsSimilarUrl(const GURL& url, const GURL& cloud_print_url) { | 127 bool IsSimilarUrl(const GURL& url, const GURL& cloud_print_url) { |
127 return url.host() == cloud_print_url.host() && | 128 return url.host() == cloud_print_url.host() && |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 775 |
775 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, | 776 print_dialog_cloud::CreatePrintDialogForFile(profile, NULL, |
776 cloud_print_file, print_job_title, print_job_print_ticket, file_type); | 777 cloud_print_file, print_job_title, print_job_print_ticket, file_type); |
777 return true; | 778 return true; |
778 } | 779 } |
779 } | 780 } |
780 return false; | 781 return false; |
781 } | 782 } |
782 | 783 |
783 } // namespace print_dialog_cloud | 784 } // namespace print_dialog_cloud |
OLD | NEW |