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 #include "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 ui::DomCode code, | 229 ui::DomCode code, |
230 ui::KeyboardCode key_code, | 230 ui::KeyboardCode key_code, |
231 int modifiers) { | 231 int modifiers) { |
232 NativeWebKeyboardEvent event(type, modifiers, base::TimeTicks::Now()); | 232 NativeWebKeyboardEvent event(type, modifiers, base::TimeTicks::Now()); |
233 BuildSimpleWebKeyEvent(type, key, code, key_code, &event); | 233 BuildSimpleWebKeyEvent(type, key, code, key_code, &event); |
234 WebContentsImpl* web_contents_impl = | 234 WebContentsImpl* web_contents_impl = |
235 static_cast<WebContentsImpl*>(web_contents); | 235 static_cast<WebContentsImpl*>(web_contents); |
236 RenderWidgetHostImpl* main_frame_rwh = | 236 RenderWidgetHostImpl* main_frame_rwh = |
237 web_contents_impl->GetMainFrame()->GetRenderWidgetHost(); | 237 web_contents_impl->GetMainFrame()->GetRenderWidgetHost(); |
238 web_contents_impl->GetFocusedRenderWidgetHost(main_frame_rwh) | 238 web_contents_impl->GetFocusedRenderWidgetHost(main_frame_rwh) |
239 ->ForwardKeyboardEvent(event); | 239 ->ForwardKeyboardEventWithLatencyInfo(event, ui::LatencyInfo()); |
240 } | 240 } |
241 | 241 |
242 void GetCookiesCallback(std::string* cookies_out, | 242 void GetCookiesCallback(std::string* cookies_out, |
243 base::WaitableEvent* event, | 243 base::WaitableEvent* event, |
244 const std::string& cookies) { | 244 const std::string& cookies) { |
245 *cookies_out = cookies; | 245 *cookies_out = cookies; |
246 event->Signal(); | 246 event->Signal(); |
247 } | 247 } |
248 | 248 |
249 void GetCookiesOnIOThread(const GURL& url, | 249 void GetCookiesOnIOThread(const GURL& url, |
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 bool user_gesture, | 1874 bool user_gesture, |
1875 bool last_unlocked_by_target, | 1875 bool last_unlocked_by_target, |
1876 bool privileged) { | 1876 bool privileged) { |
1877 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 1877 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
1878 process->GetChannel(), | 1878 process->GetChannel(), |
1879 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, | 1879 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, |
1880 privileged)); | 1880 privileged)); |
1881 } | 1881 } |
1882 | 1882 |
1883 } // namespace content | 1883 } // namespace content |
OLD | NEW |