| 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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <ostream> | 10 #include <ostream> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/scoped_observer.h" | 17 #include "base/scoped_observer.h" |
| 18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
| 19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
| 20 #include "base/values.h" | 20 #include "base/values.h" |
| 21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 22 #include "content/public/browser/bluetooth_chooser.h" | 22 #include "content/public/browser/bluetooth_chooser.h" |
| 23 #include "content/public/browser/gpu_data_manager_observer.h" | 23 #include "content/public/browser/gpu_data_manager_observer.h" |
| 24 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
| 25 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
| 26 #include "content/public/browser/render_process_host_observer.h" | 26 #include "content/public/browser/render_process_host_observer.h" |
| 27 #include "content/public/browser/web_contents_observer.h" | 27 #include "content/public/browser/web_contents_observer.h" |
| 28 #include "content/public/common/web_preferences.h" | 28 #include "content/public/common/web_preferences.h" |
| 29 #include "content/shell/common/layout_test.mojom.h" |
| 29 #include "content/shell/common/leak_detection_result.h" | 30 #include "content/shell/common/leak_detection_result.h" |
| 30 #include "ui/gfx/geometry/size.h" | 31 #include "ui/gfx/geometry/size.h" |
| 31 | 32 |
| 32 #if defined(OS_ANDROID) | 33 #if defined(OS_ANDROID) |
| 33 #include "base/threading/thread_restrictions.h" | 34 #include "base/threading/thread_restrictions.h" |
| 34 #endif | 35 #endif |
| 35 | 36 |
| 36 class SkBitmap; | 37 class SkBitmap; |
| 37 | 38 |
| 38 namespace content { | 39 namespace content { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 void OnReload(); | 209 void OnReload(); |
| 209 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); | 210 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); |
| 210 void OnCaptureSessionHistory(); | 211 void OnCaptureSessionHistory(); |
| 211 void OnCloseRemainingWindows(); | 212 void OnCloseRemainingWindows(); |
| 212 void OnResetDone(); | 213 void OnResetDone(); |
| 213 void OnLeakDetectionDone(const content::LeakDetectionResult& result); | 214 void OnLeakDetectionDone(const content::LeakDetectionResult& result); |
| 214 void OnSetBluetoothManualChooser(bool enable); | 215 void OnSetBluetoothManualChooser(bool enable); |
| 215 void OnGetBluetoothManualChooserEvents(); | 216 void OnGetBluetoothManualChooserEvents(); |
| 216 void OnSendBluetoothManualChooserEvent(const std::string& event, | 217 void OnSendBluetoothManualChooserEvent(const std::string& event, |
| 217 const std::string& argument); | 218 const std::string& argument); |
| 219 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame); |
| 220 void HandleLayoutTestControlError(RenderFrameHost* frame); |
| 218 | 221 |
| 219 std::unique_ptr<BlinkTestResultPrinter> printer_; | 222 std::unique_ptr<BlinkTestResultPrinter> printer_; |
| 220 | 223 |
| 221 base::FilePath current_working_directory_; | 224 base::FilePath current_working_directory_; |
| 222 base::FilePath temp_path_; | 225 base::FilePath temp_path_; |
| 223 | 226 |
| 224 Shell* main_window_; | 227 Shell* main_window_; |
| 225 | 228 |
| 226 // The PID of the render process of the render view host of main_window_. | 229 // The PID of the render process of the render view host of main_window_. |
| 227 int current_pid_; | 230 int current_pid_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> | 274 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> |
| 272 render_process_host_observer_; | 275 render_process_host_observer_; |
| 273 std::set<RenderProcessHost*> all_observed_render_process_hosts_; | 276 std::set<RenderProcessHost*> all_observed_render_process_hosts_; |
| 274 std::set<RenderProcessHost*> main_window_render_process_hosts_; | 277 std::set<RenderProcessHost*> main_window_render_process_hosts_; |
| 275 | 278 |
| 276 // Changes reported by OnLayoutTestRuntimeFlagsChanged that have accumulated | 279 // Changes reported by OnLayoutTestRuntimeFlagsChanged that have accumulated |
| 277 // since PrepareForLayoutTest (i.e. changes that need to be send to a fresh | 280 // since PrepareForLayoutTest (i.e. changes that need to be send to a fresh |
| 278 // renderer created while test is in progress). | 281 // renderer created while test is in progress). |
| 279 base::DictionaryValue accumulated_layout_test_runtime_flags_changes_; | 282 base::DictionaryValue accumulated_layout_test_runtime_flags_changes_; |
| 280 | 283 |
| 284 // Map from one frame to one mojo pipe. |
| 285 std::map<RenderFrameHost*, mojom::LayoutTestControlAssociatedPtr> |
| 286 layout_test_control_map_; |
| 281 #if defined(OS_ANDROID) | 287 #if defined(OS_ANDROID) |
| 282 // Because of the nested message pump implementation, Android needs to allow | 288 // Because of the nested message pump implementation, Android needs to allow |
| 283 // waiting on the UI thread while layout tests are being ran. | 289 // waiting on the UI thread while layout tests are being ran. |
| 284 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; | 290 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; |
| 285 #endif | 291 #endif |
| 286 | 292 |
| 287 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); | 293 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); |
| 288 }; | 294 }; |
| 289 | 295 |
| 290 } // namespace content | 296 } // namespace content |
| 291 | 297 |
| 292 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ | 298 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ |
| OLD | NEW |