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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 2915613004: [PointerLock] Move "silent mouse lock" logic from renderer to RWHI (Closed)
Patch Set: jochen's comment: Remove 'const' before local bool Created 3 years, 6 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
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/renderer/mouse_lock_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position)); 2041 FileSystemHostMsg_Write(request_id, file_path, blob_uuid, position));
2042 2042
2043 // If this started an async operation, wait for it to complete. 2043 // If this started an async operation, wait for it to complete.
2044 if (waiter.did_start_update()) 2044 if (waiter.did_start_update())
2045 waiter.WaitForEndUpdate(); 2045 waiter.WaitForEndUpdate();
2046 } 2046 }
2047 2047
2048 void PwnMessageHelper::LockMouse(RenderProcessHost* process, 2048 void PwnMessageHelper::LockMouse(RenderProcessHost* process,
2049 int routing_id, 2049 int routing_id,
2050 bool user_gesture, 2050 bool user_gesture,
2051 bool last_unlocked_by_target,
2052 bool privileged) { 2051 bool privileged) {
2053 IPC::IpcSecurityTestUtil::PwnMessageReceived( 2052 IPC::IpcSecurityTestUtil::PwnMessageReceived(
2054 process->GetChannel(), 2053 process->GetChannel(),
2055 ViewHostMsg_LockMouse(routing_id, user_gesture, last_unlocked_by_target, 2054 ViewHostMsg_LockMouse(routing_id, user_gesture, privileged));
2056 privileged));
2057 } 2055 }
2058 2056
2059 #if defined(USE_AURA) 2057 #if defined(USE_AURA)
2060 namespace { 2058 namespace {
2061 class MockOverscrollControllerImpl : public OverscrollController, 2059 class MockOverscrollControllerImpl : public OverscrollController,
2062 public MockOverscrollController { 2060 public MockOverscrollController {
2063 public: 2061 public:
2064 MockOverscrollControllerImpl() 2062 MockOverscrollControllerImpl()
2065 : content_scrolling_(false), 2063 : content_scrolling_(false),
2066 message_loop_runner_(new MessageLoopRunner) {} 2064 message_loop_runner_(new MessageLoopRunner) {}
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 RenderWidgetHostViewAura* rwhva = 2104 RenderWidgetHostViewAura* rwhva =
2107 static_cast<RenderWidgetHostViewAura*>(rwhv); 2105 static_cast<RenderWidgetHostViewAura*>(rwhv);
2108 rwhva->SetOverscrollControllerForTesting(std::move(mock)); 2106 rwhva->SetOverscrollControllerForTesting(std::move(mock));
2109 2107
2110 return raw_mock; 2108 return raw_mock;
2111 } 2109 }
2112 2110
2113 #endif // defined(USE_AURA) 2111 #endif // defined(USE_AURA)
2114 2112
2115 } // namespace content 2113 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.h ('k') | content/renderer/mouse_lock_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698