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_preview_dialog_controller.h" | 5 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 : WebContentsObserver(dialog) { | 51 : WebContentsObserver(dialog) { |
52 } | 52 } |
53 ~RequestPrintPreviewObserver() override {} | 53 ~RequestPrintPreviewObserver() override {} |
54 | 54 |
55 void set_quit_closure(const base::Closure& quit_closure) { | 55 void set_quit_closure(const base::Closure& quit_closure) { |
56 quit_closure_ = quit_closure; | 56 quit_closure_ = quit_closure; |
57 } | 57 } |
58 | 58 |
59 private: | 59 private: |
60 // content::WebContentsObserver implementation. | 60 // content::WebContentsObserver implementation. |
61 bool OnMessageReceived(const IPC::Message& message) override { | 61 bool OnMessageReceived(const IPC::Message& message, |
| 62 content::RenderFrameHost* render_frame_host) override { |
62 IPC_BEGIN_MESSAGE_MAP(RequestPrintPreviewObserver, message) | 63 IPC_BEGIN_MESSAGE_MAP(RequestPrintPreviewObserver, message) |
63 IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview, | 64 IPC_MESSAGE_HANDLER(PrintHostMsg_RequestPrintPreview, |
64 OnRequestPrintPreview) | 65 OnRequestPrintPreview) |
65 IPC_MESSAGE_UNHANDLED(break) | 66 IPC_MESSAGE_UNHANDLED(break) |
66 IPC_END_MESSAGE_MAP() | 67 IPC_END_MESSAGE_MAP() |
67 return false; // Report not handled so the real handler receives it. | 68 return false; // Report not handled so the real handler receives it. |
68 } | 69 } |
69 | 70 |
70 void OnRequestPrintPreview( | 71 void OnRequestPrintPreview( |
71 const PrintHostMsg_RequestPrintPreview_Params& /* params */) { | 72 const PrintHostMsg_RequestPrintPreview_Params& /* params */) { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); | 397 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); |
397 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,HelloWorld")); | 398 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,HelloWorld")); |
398 PrintPreview(); | 399 PrintPreview(); |
399 WebContents* preview_dialog = GetPrintPreviewDialog(); | 400 WebContents* preview_dialog = GetPrintPreviewDialog(); |
400 WaitForAccessibilityTreeToContainNodeWithName(preview_dialog, "HelloWorld"); | 401 WaitForAccessibilityTreeToContainNodeWithName(preview_dialog, "HelloWorld"); |
401 } | 402 } |
402 | 403 |
403 } // namespace | 404 } // namespace |
404 | 405 |
405 #endif // defined(ENABLE_TASK_MANAGER) | 406 #endif // defined(ENABLE_TASK_MANAGER) |
OLD | NEW |