OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "android_webview/browser/renderer_host/print_manager.h" | 5 #include "android_webview/browser/renderer_host/print_manager.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/common/print_messages.h" | |
9 #include "android_webview/common/render_view_messages.h" | 8 #include "android_webview/common/render_view_messages.h" |
10 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
11 #include "base/callback.h" | 10 #include "base/callback.h" |
12 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "components/printing/common/print_messages.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "printing/print_settings.h" | 15 #include "printing/print_settings.h" |
16 | 16 |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 using printing::PrintSettings; | 18 using printing::PrintSettings; |
19 | 19 |
20 DEFINE_WEB_CONTENTS_USER_DATA_KEY(android_webview::PrintManager); | 20 DEFINE_WEB_CONTENTS_USER_DATA_KEY(android_webview::PrintManager); |
21 | 21 |
22 namespace android_webview { | 22 namespace android_webview { |
23 | 23 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool PrintManager::PrintNow() { | 144 bool PrintManager::PrintNow() { |
145 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 145 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
146 if (printing_) | 146 if (printing_) |
147 return false; | 147 return false; |
148 | 148 |
149 printing_ = true; | 149 printing_ = true; |
150 return Send(new PrintMsg_PrintPages(routing_id())); | 150 return Send(new PrintMsg_PrintPages(routing_id())); |
151 } | 151 } |
152 | 152 |
153 } // namespace android_webview | 153 } // namespace android_webview |
OLD | NEW |