Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: content/shell/browser/layout_test/blink_test_controller.h

Issue 2670573002: Revert of Replace IPC messages in layout_test_render_frame_observer. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
30 #include "content/shell/common/leak_detection_result.h" 29 #include "content/shell/common/leak_detection_result.h"
31 #include "ui/gfx/geometry/size.h" 30 #include "ui/gfx/geometry/size.h"
32 31
33 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
34 #include "base/threading/thread_restrictions.h" 33 #include "base/threading/thread_restrictions.h"
35 #endif 34 #endif
36 35
37 class SkBitmap; 36 class SkBitmap;
38 37
39 namespace content { 38 namespace content {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 void OnReload(); 208 void OnReload();
210 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name); 209 void OnLoadURLForFrame(const GURL& url, const std::string& frame_name);
211 void OnCaptureSessionHistory(); 210 void OnCaptureSessionHistory();
212 void OnCloseRemainingWindows(); 211 void OnCloseRemainingWindows();
213 void OnResetDone(); 212 void OnResetDone();
214 void OnLeakDetectionDone(const content::LeakDetectionResult& result); 213 void OnLeakDetectionDone(const content::LeakDetectionResult& result);
215 void OnSetBluetoothManualChooser(bool enable); 214 void OnSetBluetoothManualChooser(bool enable);
216 void OnGetBluetoothManualChooserEvents(); 215 void OnGetBluetoothManualChooserEvents();
217 void OnSendBluetoothManualChooserEvent(const std::string& event, 216 void OnSendBluetoothManualChooserEvent(const std::string& event,
218 const std::string& argument); 217 const std::string& argument);
219 mojom::LayoutTestControl* GetLayoutTestControlPtr(RenderFrameHost* frame);
220 218
221 std::unique_ptr<BlinkTestResultPrinter> printer_; 219 std::unique_ptr<BlinkTestResultPrinter> printer_;
222 220
223 base::FilePath current_working_directory_; 221 base::FilePath current_working_directory_;
224 base::FilePath temp_path_; 222 base::FilePath temp_path_;
225 223
226 Shell* main_window_; 224 Shell* main_window_;
227 225
228 // The PID of the render process of the render view host of main_window_. 226 // The PID of the render process of the render view host of main_window_.
229 int current_pid_; 227 int current_pid_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> 271 ScopedObserver<RenderProcessHost, RenderProcessHostObserver>
274 render_process_host_observer_; 272 render_process_host_observer_;
275 std::set<RenderProcessHost*> all_observed_render_process_hosts_; 273 std::set<RenderProcessHost*> all_observed_render_process_hosts_;
276 std::set<RenderProcessHost*> main_window_render_process_hosts_; 274 std::set<RenderProcessHost*> main_window_render_process_hosts_;
277 275
278 // Changes reported by OnLayoutTestRuntimeFlagsChanged that have accumulated 276 // Changes reported by OnLayoutTestRuntimeFlagsChanged that have accumulated
279 // since PrepareForLayoutTest (i.e. changes that need to be send to a fresh 277 // since PrepareForLayoutTest (i.e. changes that need to be send to a fresh
280 // renderer created while test is in progress). 278 // renderer created while test is in progress).
281 base::DictionaryValue accumulated_layout_test_runtime_flags_changes_; 279 base::DictionaryValue accumulated_layout_test_runtime_flags_changes_;
282 280
283 // Map from one frame to one mojo pipe.
284 std::map<RenderFrameHost*, mojom::LayoutTestControlAssociatedPtr>
285 layout_test_control_map_;
286 #if defined(OS_ANDROID) 281 #if defined(OS_ANDROID)
287 // Because of the nested message pump implementation, Android needs to allow 282 // Because of the nested message pump implementation, Android needs to allow
288 // waiting on the UI thread while layout tests are being ran. 283 // waiting on the UI thread while layout tests are being ran.
289 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; 284 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_;
290 #endif 285 #endif
291 286
292 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 287 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
293 }; 288 };
294 289
295 } // namespace content 290 } // namespace content
296 291
297 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 292 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698