| 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 #ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_ | 5 #ifndef CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_ |
| 6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_ | 6 #define CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_ |
| 7 | 7 |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bool dump_child_frames() const { return dump_child_frames_; } | 104 bool dump_child_frames() const { return dump_child_frames_; } |
| 105 void set_dump_child_frames(bool dump_child_frames) { | 105 void set_dump_child_frames(bool dump_child_frames) { |
| 106 dump_child_frames_ = dump_child_frames; | 106 dump_child_frames_ = dump_child_frames; |
| 107 } | 107 } |
| 108 bool is_printing() const { return is_printing_; } | 108 bool is_printing() const { return is_printing_; } |
| 109 void set_is_printing(bool is_printing) { is_printing_ = is_printing; } | 109 void set_is_printing(bool is_printing) { is_printing_ = is_printing; } |
| 110 | 110 |
| 111 // WebContentsObserver implementation. | 111 // WebContentsObserver implementation. |
| 112 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 112 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 113 virtual void PluginCrashed(const FilePath& plugin_path) OVERRIDE; | 113 virtual void PluginCrashed(const FilePath& plugin_path) OVERRIDE; |
| 114 virtual void RenderViewReady() OVERRIDE; | 114 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
| 115 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; | 115 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; |
| 116 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; | 116 virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE; |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 static WebKitTestController* instance_; | 119 static WebKitTestController* instance_; |
| 120 | 120 |
| 121 void CaptureDump(); | 121 void CaptureDump(); |
| 122 void TimeoutHandler(); | 122 void TimeoutHandler(); |
| 123 | 123 |
| 124 // Message handlers. | 124 // Message handlers. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 137 std::string expected_pixel_hash_; | 137 std::string expected_pixel_hash_; |
| 138 | 138 |
| 139 bool captured_dump_; | 139 bool captured_dump_; |
| 140 | 140 |
| 141 bool dump_as_text_; | 141 bool dump_as_text_; |
| 142 bool dump_child_frames_; | 142 bool dump_child_frames_; |
| 143 bool is_printing_; | 143 bool is_printing_; |
| 144 bool should_stay_on_page_after_handling_before_unload_; | 144 bool should_stay_on_page_after_handling_before_unload_; |
| 145 bool wait_until_done_; | 145 bool wait_until_done_; |
| 146 | 146 |
| 147 bool did_set_as_main_window_; | |
| 148 | |
| 149 base::CancelableClosure watchdog_; | 147 base::CancelableClosure watchdog_; |
| 150 | 148 |
| 151 DISALLOW_COPY_AND_ASSIGN(WebKitTestController); | 149 DISALLOW_COPY_AND_ASSIGN(WebKitTestController); |
| 152 }; | 150 }; |
| 153 | 151 |
| 154 class WebKitTestRunnerHost : public RenderViewHostObserver { | 152 class WebKitTestRunnerHost : public RenderViewHostObserver { |
| 155 public: | 153 public: |
| 156 explicit WebKitTestRunnerHost(RenderViewHost* render_view_host); | 154 explicit WebKitTestRunnerHost(RenderViewHost* render_view_host); |
| 157 virtual ~WebKitTestRunnerHost(); | 155 virtual ~WebKitTestRunnerHost(); |
| 158 | 156 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 170 | 168 |
| 171 void OnNotImplemented(const std::string& object_name, | 169 void OnNotImplemented(const std::string& object_name, |
| 172 const std::string& method_name); | 170 const std::string& method_name); |
| 173 | 171 |
| 174 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunnerHost); | 172 DISALLOW_COPY_AND_ASSIGN(WebKitTestRunnerHost); |
| 175 }; | 173 }; |
| 176 | 174 |
| 177 } // namespace content | 175 } // namespace content |
| 178 | 176 |
| 179 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_ | 177 #endif // CONTENT_SHELL_WEBKIT_TEST_RUNNER_HOST_H_ |
| OLD | NEW |