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 #include "base/auto_reset.h" | 5 #include "base/auto_reset.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/common/input/synthetic_web_input_event_builders.h" | 10 #include "content/common/input/synthetic_web_input_event_builders.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 " }" | 75 " }" |
76 "</script>"; | 76 "</script>"; |
77 | 77 |
78 } // namespace | 78 } // namespace |
79 | 79 |
80 namespace content { | 80 namespace content { |
81 | 81 |
82 class InputEventMessageFilter : public BrowserMessageFilter { | 82 class InputEventMessageFilter : public BrowserMessageFilter { |
83 public: | 83 public: |
84 InputEventMessageFilter() | 84 InputEventMessageFilter() |
85 : BrowserMessageFilter(InputMsgStart), | 85 : type_(WebInputEvent::Undefined), |
86 type_(WebInputEvent::Undefined), | |
87 state_(INPUT_EVENT_ACK_STATE_UNKNOWN) {} | 86 state_(INPUT_EVENT_ACK_STATE_UNKNOWN) {} |
88 | 87 |
89 void WaitForAck(WebInputEvent::Type type) { | 88 void WaitForAck(WebInputEvent::Type type) { |
90 base::RunLoop run_loop; | 89 base::RunLoop run_loop; |
91 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); | 90 base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); |
92 base::AutoReset<WebInputEvent::Type> reset_type(&type_, type); | 91 base::AutoReset<WebInputEvent::Type> reset_type(&type_, type); |
93 run_loop.Run(); | 92 run_loop.Run(); |
94 } | 93 } |
95 | 94 |
96 InputEventAckState last_ack_state() const { return state_; } | 95 InputEventAckState last_ack_state() const { return state_; } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 285 |
287 INSTANTIATE_TEST_CASE_P(WithoutInputHandlerProxy, TouchInputBrowserTest, | 286 INSTANTIATE_TEST_CASE_P(WithoutInputHandlerProxy, TouchInputBrowserTest, |
288 ::testing::Values(std::string(switches::kDisableThreadedCompositing))); | 287 ::testing::Values(std::string(switches::kDisableThreadedCompositing))); |
289 | 288 |
290 #if !defined(OS_MACOSX) | 289 #if !defined(OS_MACOSX) |
291 INSTANTIATE_TEST_CASE_P(WithInputHandlerProxy, TouchInputBrowserTest, | 290 INSTANTIATE_TEST_CASE_P(WithInputHandlerProxy, TouchInputBrowserTest, |
292 ::testing::Values(std::string(switches::kEnableThreadedCompositing))); | 291 ::testing::Values(std::string(switches::kEnableThreadedCompositing))); |
293 #endif | 292 #endif |
294 | 293 |
295 } // namespace content | 294 } // namespace content |
OLD | NEW |