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

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

Issue 2594913002: Replace IPC messages in layout_test_render_frame_observer. (Closed)
Patch Set: Clean up map Created 3 years, 11 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/leak_detection_result.h" 29 #include "content/shell/common/leak_detection_result.h"
30 #include "content/shell/common/shell.mojom.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 {
39 40
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 const mojom::ShellViewAssociatedPtr& GetShellViewPtr(RenderFrameHost* frame);
tibell 2017/01/19 00:29:54 This could probably return a mojom::ShellView* ins
Jia 2017/01/20 01:52:14 Done.
218 220
219 std::unique_ptr<BlinkTestResultPrinter> printer_; 221 std::unique_ptr<BlinkTestResultPrinter> printer_;
220 222
221 base::FilePath current_working_directory_; 223 base::FilePath current_working_directory_;
222 base::FilePath temp_path_; 224 base::FilePath temp_path_;
223 225
224 Shell* main_window_; 226 Shell* main_window_;
225 227
226 // The PID of the render process of the render view host of main_window_. 228 // The PID of the render process of the render view host of main_window_.
227 int current_pid_; 229 int current_pid_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 ScopedObserver<RenderProcessHost, RenderProcessHostObserver> 273 ScopedObserver<RenderProcessHost, RenderProcessHostObserver>
272 render_process_host_observer_; 274 render_process_host_observer_;
273 std::set<RenderProcessHost*> all_observed_render_process_hosts_; 275 std::set<RenderProcessHost*> all_observed_render_process_hosts_;
274 std::set<RenderProcessHost*> main_window_render_process_hosts_; 276 std::set<RenderProcessHost*> main_window_render_process_hosts_;
275 277
276 // Changes reported by OnLayoutTestRuntimeFlagsChanged that have accumulated 278 // Changes reported by OnLayoutTestRuntimeFlagsChanged that have accumulated
277 // since PrepareForLayoutTest (i.e. changes that need to be send to a fresh 279 // since PrepareForLayoutTest (i.e. changes that need to be send to a fresh
278 // renderer created while test is in progress). 280 // renderer created while test is in progress).
279 base::DictionaryValue accumulated_layout_test_runtime_flags_changes_; 281 base::DictionaryValue accumulated_layout_test_runtime_flags_changes_;
280 282
283 // Map from one frame to one mojo pipe.
284 std::map<RenderFrameHost*, mojom::ShellViewAssociatedPtr> shellview_map_;
281 #if defined(OS_ANDROID) 285 #if defined(OS_ANDROID)
282 // Because of the nested message pump implementation, Android needs to allow 286 // Because of the nested message pump implementation, Android needs to allow
283 // waiting on the UI thread while layout tests are being ran. 287 // waiting on the UI thread while layout tests are being ran.
284 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_; 288 ScopedAllowWaitForAndroidLayoutTests reduced_restrictions_;
285 #endif 289 #endif
286 290
287 DISALLOW_COPY_AND_ASSIGN(BlinkTestController); 291 DISALLOW_COPY_AND_ASSIGN(BlinkTestController);
288 }; 292 };
289 293
290 } // namespace content 294 } // namespace content
291 295
292 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_ 296 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_BLINK_TEST_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698