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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 ui::DomCode code, | 239 ui::DomCode code, |
240 ui::KeyboardCode key_code, | 240 ui::KeyboardCode key_code, |
241 int modifiers) { | 241 int modifiers) { |
242 NativeWebKeyboardEvent event(type, modifiers, base::TimeTicks::Now()); | 242 NativeWebKeyboardEvent event(type, modifiers, base::TimeTicks::Now()); |
243 BuildSimpleWebKeyEvent(type, key, code, key_code, &event); | 243 BuildSimpleWebKeyEvent(type, key, code, key_code, &event); |
244 WebContentsImpl* web_contents_impl = | 244 WebContentsImpl* web_contents_impl = |
245 static_cast<WebContentsImpl*>(web_contents); | 245 static_cast<WebContentsImpl*>(web_contents); |
246 RenderWidgetHostImpl* main_frame_rwh = | 246 RenderWidgetHostImpl* main_frame_rwh = |
247 web_contents_impl->GetMainFrame()->GetRenderWidgetHost(); | 247 web_contents_impl->GetMainFrame()->GetRenderWidgetHost(); |
248 web_contents_impl->GetFocusedRenderWidgetHost(main_frame_rwh) | 248 web_contents_impl->GetFocusedRenderWidgetHost(main_frame_rwh) |
249 ->ForwardKeyboardEvent(event); | 249 ->ForwardKeyboardEventWithLatencyInfo(event, ui::LatencyInfo()); |
250 } | 250 } |
251 | 251 |
252 void GetCookiesCallback(std::string* cookies_out, | 252 void GetCookiesCallback(std::string* cookies_out, |
253 base::WaitableEvent* event, | 253 base::WaitableEvent* event, |
254 const std::string& cookies) { | 254 const std::string& cookies) { |
255 *cookies_out = cookies; | 255 *cookies_out = cookies; |
256 event->Signal(); | 256 event->Signal(); |
257 } | 257 } |
258 | 258 |
259 void GetCookiesOnIOThread(const GURL& url, | 259 void GetCookiesOnIOThread(const GURL& url, |
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 bool user_gesture, | 2031 bool user_gesture, |
2032 bool last_unlocked_by_target, | 2032 bool last_unlocked_by_target, |
2033 bool privileged) { | 2033 bool privileged) { |
2034 IPC::IpcSecurityTestUtil::PwnMessageReceived( | 2034 IPC::IpcSecurityTestUtil::PwnMessageReceived( |
2035 process->GetChannel(), | 2035 process->GetChannel(), |
2036 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, | 2036 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, |
2037 privileged)); | 2037 privileged)); |
2038 } | 2038 } |
2039 | 2039 |
2040 } // namespace content | 2040 } // namespace content |
OLD | NEW |