| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogDestroyedObserver); | 121 DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogDestroyedObserver); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 void PluginsLoadedCallback( | 124 void PluginsLoadedCallback( |
| 125 const base::Closure& quit_closure, | 125 const base::Closure& quit_closure, |
| 126 const std::vector<content::WebPluginInfo>& /* info */) { | 126 const std::vector<content::WebPluginInfo>& /* info */) { |
| 127 quit_closure.Run(); | 127 quit_closure.Run(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void PluginEnabledCallback(const base::Closure& quit_closure, bool can_enable) { | |
| 131 EXPECT_TRUE(can_enable); | |
| 132 quit_closure.Run(); | |
| 133 } | |
| 134 | |
| 135 bool GetPdfPluginInfo(content::WebPluginInfo* info) { | 130 bool GetPdfPluginInfo(content::WebPluginInfo* info) { |
| 136 base::FilePath pdf_plugin_path = base::FilePath::FromUTF8Unsafe( | 131 base::FilePath pdf_plugin_path = base::FilePath::FromUTF8Unsafe( |
| 137 ChromeContentClient::kPDFPluginPath); | 132 ChromeContentClient::kPDFPluginPath); |
| 138 return content::PluginService::GetInstance()->GetPluginInfoByPath( | 133 return content::PluginService::GetInstance()->GetPluginInfoByPath( |
| 139 pdf_plugin_path, info); | 134 pdf_plugin_path, info); |
| 140 } | 135 } |
| 141 | 136 |
| 142 const char kDummyPrintUrl[] = "chrome://print/dummy.pdf"; | 137 const char kDummyPrintUrl[] = "chrome://print/dummy.pdf"; |
| 143 | 138 |
| 144 void CountFrames(int* frame_count, | 139 void CountFrames(int* frame_count, |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); | 390 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); |
| 396 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,HelloWorld")); | 391 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,HelloWorld")); |
| 397 PrintPreview(); | 392 PrintPreview(); |
| 398 WebContents* preview_dialog = GetPrintPreviewDialog(); | 393 WebContents* preview_dialog = GetPrintPreviewDialog(); |
| 399 WaitForAccessibilityTreeToContainNodeWithName(preview_dialog, "HelloWorld"); | 394 WaitForAccessibilityTreeToContainNodeWithName(preview_dialog, "HelloWorld"); |
| 400 } | 395 } |
| 401 | 396 |
| 402 } // namespace | 397 } // namespace |
| 403 | 398 |
| 404 #endif // defined(ENABLE_TASK_MANAGER) | 399 #endif // defined(ENABLE_TASK_MANAGER) |
| OLD | NEW |